- 时间:2022-04-28 13:15 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:iOS开发中UITabBarController的使用示例
首先我们看一下它的view层级图:
[img]http://files.jb51.net/file_images/article/201509/2015924100950035.jpg?201582410106[/img]
=@"humingtao";
//创建一个按钮来实现退出控制器
/* UIButton * button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
button.frame = CGRectMake(100, 100, 100, 100);
[button addTarget:self action:@selector(modalDismiss) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];*/
}
- (void)modalDismiss{
//退出模态视图控制器
[self dismissViewControllerAnimated:YES completion:^{
NSLog(@"退出GoodBye");
}];
}
@end