So i have a:
arrangeList = [[UITableView alloc] initWithFrame:CGRectMake(attributesPadding, y, popoverWidth - 2* attributesPadding, popoverHeight - y - attrib开发者_Go百科utesPadding) style:UITableViewStylePlain];
That is the tableview that i want to connect to a controller, and i also have added this tableview to a uiview that i have animate onto the screen in based on a click. So i subclassed uiviewcontroller and created this :
arrangeListViewController = [[[ArrangeListViewController alloc] init] autorelease];
Now how do i make it so that the 'arrangeList' is populated based on 'arrangeListViewController'?
Is this approach way wrong ? any help is welcome
I think you'll want to look at something like:
arrangeListViewController.tableView = arrangeList;
[arrangeList release]; //avoid leaking the arrangeList
Personally, I prefer setting this up in InterfaceBuilder, but it'll work programatically as well.
Hope this helps. Andrew.
精彩评论