Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting a UITableView's contentInset through Storyboard in Xcode 6

On Xcode 6, it seems that the ability to set the content inset of a scroll view/table view through UIStoryboard has been taken away. See image below:

on the image

the parameters on the left are from Xcode 6, whereas the parameters on the right are from Xcode 5

Does anyone know if the parameters have moved, or are we no longer able to set the content inset through UIStoryboard? I'd really like to keep this out of my code if possible..

like image 422
3254523 Avatar asked Aug 08 '14 16:08

3254523


1 Answers

You can do that by using KVC

  1. Select table view
  2. Choose Identity Inspector
  3. Press "+" in "User defined runtime attributes"
  4. Add your inset as a Rect {{10,15},{25,10}} for KeyPath contentInset

Screenshot here:

enter image description here

like image 137
Maksim Bazarov Avatar answered Oct 28 '22 17:10

Maksim Bazarov