开发者

how to use two navigation controller in same page for iPhone Application

I have been used no. of page in my app. and i am pushing one from other.All data are are coming from from server.In every page one part of page is fixed at start while pushing 开发者_StackOverflow社区remaing part of page is pushed . This is working fine. even i have used back button all things are doing fine But the problem arises when i reached to last page then i want two buttons at top , once going just to previous page and another goes to start page.the previous buttons buttons work fine but next button creates problem it will goes to 1st page but fixed part of page gone blank. i will giving code as follow:

-(IBAction)btnHome_Click:(id)sender
{
     TweetListing *rit= [[TweetListing alloc] initWithNibName:@"TweetListing" bundle:[NSBundle mainBundle]];
     addNavigationController = [[UINavigationController alloc] initWithRootViewController:rit];
     [self.navigationController presentModalViewController:addNavigationController animated:NO];
}

-(void) viewWillAppear:(BOOL)animated
{
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
                    initWithTitle:@"Home" style:UIBarButtonItemStylePlain
                    target:self action:@selector(btnHome_Click:)];
}

so please provide some code to solve this problem


You probably don't want to manage this UI with the navigation controller. To add a back, forward, and reload button, simply add a toolbar to the bottom of the View, and add the necessary UIBarButtonItems. Apple includes a bunch of very useful ones that look like Mobile Safari in Interface Builder.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜