简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM