您的位置:首页 > 移动开发 > IOS开发

ios 实现导航控制器带动画的推送页面

2013-02-07 14:55 513 查看
- (void)viewDidLoad

{

[super viewDidLoad];

self.view.backgroundColor=[UIColor grayColor];

self.navigationController.navigationItem.title=@"A";

self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(back1)];

}

-(void)back1{

B *b=[[B alloc]init];

b.view.backgroundColor=[UIColor redColor];

UINavigationController *navi=[[UINavigationController alloc]initWithRootViewController:b];

navi.viewControllers=[NSArray arrayWithObjects:b, nil];

[b release];

navi.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController:navi animated:YES];

[navi release];

}

- (void)viewDidLoad

{

[super viewDidLoad];

// Do any additional setup after loading the view.

self.navigationController.navigationItem.title=@"B";

self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(back)];

}

-(void)back{

[self dismissModalViewControllerAnimated:YES];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐