[MonoTouch] Basic TableView
dermotos
me at dermotos.com
Wed Oct 19 22:20:37 EDT 2011
Id agree with Monotouch dialog, but as others have said, it helps to
understand how it works first.
But to give you a more direct answer to your question, you need to place
your views inside a parent Navigation Controller. Then, when the RowSelected
is fired, you call
NavigationController.PushViewController(detailPageViewController); to tell
the parent to swap out the current view (the table view) for a new view
(whatever type of view DetailPageViewController is).
(where detailPageViewController is an instance of your detail View
Controller)
This will automatically create a back button for you on the NavigationItem
(the navigation bar at the top) on your detail page to pop back a level.
If, on the detail page, you want to show another level of detail, just
repeat
this.NavigationController.PushViewController(evenMoreDetailViewController);
The navigation controller will manage the view stack for you.
If you want tabs and the Back/Forward structure mixed together, its just a
case of having your view/controller hierarchy like this:
TabViewController
|
|-Navigation Controller
| |
| |- TableViewController
|
|-Navigation Controller 2
| |
| |- TableViewController 2
etc...
--
View this message in context: http://monotouch.2284126.n4.nabble.com/Basic-TableView-tp3918144p3920711.html
Sent from the MonoTouch mailing list archive at Nabble.com.
More information about the MonoTouch
mailing list