You can also try this solution If you are using Custom tableview cell in Xib than
step1: RightClick on cell xib
step2: Open As > source code
step3: try to find <tableViewCellContentView>
tag section.
step4: find autoresizingMask
tag below <tableViewCellContentView>
and add widthSizable="YES"
in <autoresizingMask>
tag
for example
`<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1Ah-hd-rCV" id="Xqs-eb-z8W">`
`<autoresizingMask key="autoresizingMask" widthSizable="YES"/>`
`</tableViewCellContentView>`
it Looks like above code after setting this.
because tableviewcell's content view does not autoresize width so you have to code for that. Like above.
and if you are adding cell by programming than this will not help you have to create xib for tableviewCell and in storyboard this will work also you have to open source code by right clicking on storyboard.
put UIView in tableViewCell and make cell background clear and tableview you want to grey than set its background color grey and make size of UIView you want to display and do it horizontally stretched in autoresizing mask.
Hope this will help you.
Thank you!