Loading view from UITableViewController
I made a UITableViewController and tried loading it the previous view
[self.开发者_如何学运维view addSubview: poll_ridingController.view];
but when i run it, it display me a blank kid of thing where the footer was supposed to be.
See the attached Picture.
The view you see IB just has what I like to call "eye-candy data" which means that Interface Builder does not implement any data into your project that is your job. The methods you will need to make sure you implement are:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
For more information read the Apple Documents
精彩评论