• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple ViewControllers and MultipleViews - Best Approach

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a very large form to build in my ipad application and I'm note sure which approach( between create multiple views in or multiple viewcontrollers ) to follow. Well, I have decided to split may form in logical sections, so I want use a splitviewcontroller with a root( a tableviewcontroller with the sections) and multipleviecontrollers for each sections. When the user select a row in tableview I will show the correspondent viewcontroller. I'm saving a reference for each viewcontroller in my app_delegate and the app_delegate also is the responsible for change the viewcontrollers. Is this the best approach? There is other approach to follow? About the multiple view I was thinking to put multiple view in the same xib file and then choose based in tag as the use tap the row in rootviewcontroller's tableview.

Thanks in advance. And sorry for my bad english.. Learning!
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand completely what you are talking about. I have that similar in my TubeOrganizer app. But I definitely create a View and a View Controller for each visual view I needed. That includes separate xib/nib files. This was really helpful with my app being Universal, in that a few of the smaller subview being their own nib and viewController I could reuse it for both the iPhone and iPad apps.

Now as far as best practice, I think having the app delegate hold onto more detail views and objects and be in control is like global variables.

Just remember in that SplitViewCOntroller the SplitView and SplitViewController are the parent views with at minimum two views and two viewControllers. One for the left side and one for the right side. Then you can break apart your right side into different Views and ViewControllers and have your DetailViewCOntroller have those different views as subviews.

Hope that helps

Mark
 
Giovanni Lima
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
Following what you said at the end, you mean that my detailviewcontroller would be the responsible for switch between others view controllers? or simple views? I can create differente Views in diferente nibs( because they too big ) and just save a reference in my detailviewcontroller and switch between them as subviews in my detailviewcontroller?

Thanks in advance!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic