iOS开发中UITabBarController的使用示例

内容摘要
首先我们看一下它的view层级图:



=@"humingtao";



//创建一个按钮来实现退出控制器

/* UIButton * button = [UIButton buttonWithType:UIButtonTypeDetailD
文章正文

首先我们看一下它的view层级图:

=@"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



代码注释

作者:喵哥笔记

IDC笔记

学的不仅是技术,更是梦想!