iOS开发中UITabBarController的使用示例


首先我们看一下它的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



« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3