UITableViewController's TableView becomes NULL
I have UITableViewController (initiated by the Navigation-based app project template). I am overriding loadView and putting up an alternative view (w/ a UILabel and UIActivityIndicator) to display while the table's contents is loading. 开发者_运维知识库
When the loading is done, I remove the loading view and try to display the table view but I see that it's NULL. So in the simulator I see my loading view and then when the loading's done the view disappears but my tableview never comes.
I'm confused what the difference is between self.view and self.tableView in my UITableViewController and how I can exchagn
You should probably add your subview like this instead [self.view addSubview:myNewView];
. Then, you can remove it after loading. I am pretty sure that a UITVC's view
and tableView
properties are set to the same backing ivar, so you shouldn't mess with them.
精彩评论