views:

26

answers:

2

Dear All,

From What I understand based on what I read, most of the time we will be dealing with view when creating apps for the iPhone. Adding sub view to table view, adding table view to a UIView....etc

So my question is how do I go about mix and match all the views? Let say I start off by using a template in Xcode (Tab Bar Application) which basically give me 2 "section", a tab bar controller with 2 UIView to began with. I modified the code for the UIView so that I end up with 2 table view. Now I wanted to an add additional view to the table view whenever I tap on a cell on the table view. I create a new view controller call firstDetailView and hook them up but nothing happen. Surprisingly the app doesn't crash.

I might do it wrongly or have missed something. I am a newbies to programming. Any help would be appreciated.

Thanks.

A: 

Well i am not getting your question , what u really want to ask ..

mrugen
Sorry for not being clear. I'm really doesn't know how to ask this, here we go...I want to know how to add a view (sub view?) to a view and add another sub view to that view.For example:tab view > table view > image view Thanks.
Jeno
A: 

If you want to deal with different views which are handled by a view controller you should read the View Controller Programming Guide

  • Navigation through views will be done with a Navigation Controller (Guide here)
  • Tab bar's are explained as well (Guide here)

Try to read the Apple documentation in the first hand, they are pretty good and all basic stuff is explained there.

brutella
Thanks Brutella. I will read through the documentation tonight.
Jeno
After spending hours searching the stack. I think I found my answer."Replace your UITableViewController with a UIViewController. Then add a UITableView to your view controller. Set the delegate and datasource of your table view to your view controller. Now you can add a subview in a non-scrolling view-controller, still having your tableview."http://stackoverflow.com/questions/3541428/add-details-view-to-uitableview
Jeno