Using Static Cells in a UIView Storyboard with Xcode 4.2

I am trying to create a very simple login screen using the Storyboard constructor in Xcode 4.2. I would like the grouped table view to contain login and password fields. There are some other elements in appearance, such as a login button, a link to a forgotten password, etc. In addition, the background should be able to listen to the keyboard when the input field has focus.

Pre-Xcode 4.2, I performed this with UIView, which implemented the UITableViewDataSource protocol, generated and returned cells, etc.

In Xcode 4.2, all this seems very close to being executed visually with a static cell, but you are not allowed to use static cells unless the table is part of the UITableViewController (or subclass). I don’t see a way to arrange the elements I need in this scene using the TableViewController, so I wonder if there is a better approach here.

Here is what I did for the layout:

mockup

Is there a way to fulfill this use case with the storyboard designer?

+5
source share
2 answers

1) If your view controller is not an instance of the UITableViewController, this is not possible.

Apple (https://developer.apple.com/library/ios/#releasenotes/Miscellaneous/RN-AdoptingStoryboards/_index.html#//apple_ref/doc/uid/TP40011297):

, UITableViewController, .

2) UITableViewController , :

http://www.skylarcantu.com/blog/2009/09/24/dont-use-uitableviewcontroller-really/

: , .

+2

, .

0

All Articles