How to visually create and use static cells in a UITableView embedded in a UIViewController

You can achieve this in Xcode 4.5 and later versions, assuming your app is targeted at iOS 6+.

In the Storyboard simply create a UIViewController with a View Container inside it’s main view. Then hook up that View Container to a UITableViewController that contains static cells.

Just like this:

enter image description here

You don’t need a single line of code. Just control click, drag and select embed. The view controller containment is handled for you.

Leave a Comment