An example of using the extended elements of the table iPhone

I survived and recreated Apple's “Advanced Table View Cells” to better understand everything. I did everything, but somehow I missed one detail, and I can’t understand.

If you run your example ( http://developer.apple.com/iphone/library/samplecode/AdvancedTableViewCells/Introduction/Intro.html ) and open the RootViewController.xib file, they have a "tableView" inspector associated with the file owner. For some reason, I cannot get this to show my version.

My code is almost verbatim from Apple, so what am I missing? Didn’t I announce that somewhere or not, which are taken from the RootViewController.m file?

+3
source share
3 answers

So, after I looked for this problem for a while ... I realized that the workaround. Note that all of my code was exactly the same as that of Apple, but IB never showed the exit tableView(as if it had not been subclassed by UITableView correctly in my UINavigation controller).

Essentially, all I did was change the subclass from the UITableViewController to the UIViewController, and then call the delegate and data source protocols. By doing this and creating my own tableView, I was finally able to hook up the tableView and make it work as it should.

@interface RootViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {

before

@interface RootViewController : UITableViewController {
0
source

Has the file owner set the class of the object you are trying to link to?

, , xib , , .

- NSObject, , "" (Cmd + 4), "-" " ", . UITableViewController, .

+2

RootViewController UITableViewController. tableView.

+1

Source: https://habr.com/ru/post/1744440/


All Articles