开发者

Problem in the flow of custom back button when using UIView controller

I am new to iphone development.I have created a button in UIView controller.On clicking the button it navigates to a another UITableView controller .On clicking the row of the table leads to another UIView controller which has also another table in it.On clicking the row of this table leads to another UIWebView.I have created a custom back button placed on the navigation bar of the UIView controllers and UIWebview.On clicking on the back button just leads me to the main page with a button and not to its just previous UIView.

-(IBAction) goemenbutton : (id) sender 
{

[self.view removeFromSuperview];

}
开发者_开发知识库

The above method is used for all the custom back button.Please help me out to get the correct flow for the back button.Thanks.


You should probably look at using UINavigationController instead of interchanging several views within one UIViewController. The UINavigationController takes care of a lot of things for you, including back buttons with proper titles and nice animations. It also helps you structure your code and gives you more flexibility down the road.

A UIWebview is not a UIViewController and can not be pushed onto the NavigationController. You should probably look at wrapping it into a UIViewController.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜