probably a very simple question but can’t find the right answer anywhere. I am using XCode 4 and working on an iphone app, which probably sums up all the info that I need to provide.
Here it is:
– I created a ViewBasedApplication
– At some point depending on the user input, I load a TableView
But now how on Earth do I add a button or something to return? Note: I can’t use a NavigationBased app, that would be easier but would not work for me.
Help anyone?
If you used a
UITableViewController, you may want to use aUIViewControllerinstead. In theUIVeiwController, you can add a UITableView along with your ownUINavigationBaror, if you don’t want to use aUINavigationBar, you could leave room for some type of customUIButton. Either theUINavigationBarbutton or your customUIButtonaction could trigger a close of yourUIViewController.If you add the UIViewController as a subview, then Cyprian’s
[self removeFromSuperView];would work. If you present as a modal as Jamie suggests, you could use[self dismissModalViewControllerAnimated:YES];.