iOS的UI开发中UITabBarControlle的基本使用教程

2020-01-14 18:05:04于海丽

在Application的下面方法中打印UITabBar的frame进行查看。

复制代码
- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    UITabBarController *tb=(UITabBarController*)self.window.rootViewController;
    NSLog(@"%@",NSStringFromCGRect(tb.tabBar.frame));
}
打印结果为:

 

iOS的UI开发中UITabBarControlle的基本使用教程



注:相关教程知识阅读请移步到IOS开发频道。