您的位置:首页 > 产品设计 > UI/UE

UINavigationController先pop再push

2016-05-05 14:33 549 查看
UINavigationController先pop再push

HXChatMsgViewController *chatMessage = [[HXChatMsgViewController alloc]initWithChatter:model.profile.userId isGroup:NO];
NSMutableArray *ViewCtr = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
NSLog(@"navigation viewControllers is %@", ViewCtr);
int index = (int)[ViewCtr indexOfObject:self];
[ViewCtr removeObjectAtIndex:index];
[ViewCtr addObject:chatMessage];
NSLog(@"the viewCtl is %@", ViewCtr);
[self.navigationController setViewControllers:ViewCtr animated:YES];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: