jeudi 8 janvier 2015

How to programmatically create a UITableView in UIPopover so it responds to -cellForRowAtIndexPath


Vote count:

0




I have 3 UITableViews in a class; one of the tableViews is programmatically created in a UIPopover where I assign it a tag. In -cellForRowAtIndexPath, I check the tag each tableView and configure the tableView depending on the tag id.


The problem is the popover is not created until after -cellForRowAtIndexPath is called. I don't see how I can have a separate -cellForRowAtIndexPath in the method that creates the tableView in the popover. I have the tableView.delegate = self in the method that creates the tableView.


Can I take the pertinent code in -cellForRowAtIndexPath that belongs to the tableView, put it in a new method and replace self in the tableView.delegate? (tableView.delegate = newMethod).



asked 30 secs ago







How to programmatically create a UITableView in UIPopover so it responds to -cellForRowAtIndexPath

Aucun commentaire:

Enregistrer un commentaire