Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I have a view controller. In this view controller is content that appears in an orderly fashion. I also have a table view controller. Each cell in the table view is supposed to cause the other view controller to display a specific portion of the controller.

Is it possible to do this? If so, how? Also, would creating separate view controllers and programming my app to initiate one view controller after the preceding one's content has been displayed be a better idea?
 
UIViewController has a method called prepareForSegue:sender: that I think you'll find is useful. You can determine who is triggering the segue using the sender argument as well as the view controller being segued to by checking the destinationViewController property of the segue argument.
 
UIViewController has a method called prepareForSegue:sender: that I think you'll find is useful. You can determine who is triggering the segue using the sender argument as well as the view controller being segued to by checking the destinationViewController property of the segue argument.

Thanks. I just tried creating a separate view controller and just programming my app to jump to that view controller when the first one's controller finished, but got an error. I think I'll just use the prepareForSegue method. Thankfully, I have a snapshot I can restore my project to.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.