1.
UIViewController 默认方式 XIB viewDidLoad
UIViewController.view addSubView ---------范围 中间部分
UINavigationController 导航视图控制器 栈关系
initWithRootViewController -----------范围 除去最下面部分 包含状态栏
UITabBarController 标签视图控制器 平级关系 tabBar高度49
NSArray *array=@[navVC];
tabVC.viewControllers=array; -----------范围 整个屏幕
在UITabBarItem 中写方法 self.tabBarItem.image
都可以控制视图控制器UIViewController 而他两也都属于视图
2.UITabBarItem 可以自己直接调用属性赋值
也可以创建一个 UITabBarItem 然后赋给自己
homeViewController.tabBarItem=tabItem
3.用户可以自己定制UITabBarItem
自定义UITabBarController里创建一个视图 添加按钮 记住不是UITableViewController
4.window 添加视图
window.rootViewController 添加根视图控制器
5.一定要记住图片 数组 取的是字符串 不报错 只崩溃
6.UINavigationControllerDelegate UINavigationController的代理
UITabBarController 实现其协议,别的导航控制器调用代理
if (navigationController.viewControllers.count==1)
7.自定义UITabBarItem 视图切换动画效果
if (navigationController.viewControllers.count==1) {
[UIView beginAnimations:Nil context:Nil];
[UIView setAnimationDuration:.25];
_tabBarView.frame=CGRectMake(0, screenHeight-49, screenWidth,49);
[UIView commitAnimations];
}
按钮点击 视图切换效果
UIImageView *imageView=(UIImageView *)[_tabBarView viewWithTag:101];
[UIView beginAnimations:Nil context:nil];
[UIView setAnimationDuration:0.25];
imageView.center=button.center;
[UIView commitAnimations];
8.切换导航栏
if(button.tag==0)
self.selectedIndex=0;
else if(button.tag==4)
self.selectedIndex=1;
9.[UIScreen mainScreen].bounds.size.height 屏幕的高度
UIViewController 默认方式 XIB viewDidLoad
UIViewController.view addSubView ---------范围 中间部分
UINavigationController 导航视图控制器 栈关系
initWithRootViewController -----------范围 除去最下面部分 包含状态栏
UITabBarController 标签视图控制器 平级关系 tabBar高度49
NSArray *array=@[navVC];
tabVC.viewControllers=array; -----------范围 整个屏幕
在UITabBarItem 中写方法 self.tabBarItem.image
都可以控制视图控制器UIViewController 而他两也都属于视图
2.UITabBarItem 可以自己直接调用属性赋值
也可以创建一个 UITabBarItem 然后赋给自己
homeViewController.tabBarItem=tabItem
3.用户可以自己定制UITabBarItem
自定义UITabBarController里创建一个视图 添加按钮 记住不是UITableViewController
4.window 添加视图
window.rootViewController 添加根视图控制器
5.一定要记住图片 数组 取的是字符串 不报错 只崩溃
6.UINavigationControllerDelegate UINavigationController的代理
UITabBarController 实现其协议,别的导航控制器调用代理
if (navigationController.viewControllers.count==1)
7.自定义UITabBarItem 视图切换动画效果
if (navigationController.viewControllers.count==1) {
[UIView beginAnimations:Nil context:Nil];
[UIView setAnimationDuration:.25];
_tabBarView.frame=CGRectMake(0, screenHeight-49, screenWidth,49);
[UIView commitAnimations];
}
按钮点击 视图切换效果
UIImageView *imageView=(UIImageView *)[_tabBarView viewWithTag:101];
[UIView beginAnimations:Nil context:nil];
[UIView setAnimationDuration:0.25];
imageView.center=button.center;
[UIView commitAnimations];
8.切换导航栏
if(button.tag==0)
self.selectedIndex=0;
else if(button.tag==4)
self.selectedIndex=1;
9.[UIScreen mainScreen].bounds.size.height 屏幕的高度