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.
精彩评论