Ive been tearing my hair out over the last couple of days trying to understand this one seemingly basic concept of iOS development:
If I want to have two or more View Controllers displayed and usable in the same "screenful", is this:
- Not advisable as per Apple's "One VC per screenful of content"
- Completely possible by adding the VC's via code
- Just not done. Instead, use one VC and simply add code that mimics the functionality of the view controllers you want.
Let me rephrase a bit:
If I wanted to have, in an iPad app, a UIView
(A) that takes up a large portion of the left side of the screen, and a second UIView
(B) that takes up the rest of the right side of the screen, and I wanted to add a button to UIView
B that when clicked would use the Modal transition to slide up a UITableview
to replace UIView B, and this UITableview
would then act like a typical UITableviewController
whereby when the user picks an item from the table, the typical events are sent to the tableview controller to push in a new set of items, is this possible?
It just seems to me that if Im already able to easily create two separate UIViewControllers, and have a button in one VC modally bring up the second VC, why cant I combine this functionality so that one VC has two children VCs, and those children VCs handle their own modal transitions.
Or is the best practice in a case like this to simply have one VC that handles everything, and then manually handle animating the slides in / out of various views after various clicks on various UI elements?
As you can tell, I think Ive read too many different, conflicting responses to questions similar to this that Ive gotten entirely confused about whats what anymore. If anyone out there understands what Im getting at and can lend a helping explanation or some pointers Id greatly appreciate it.