UINavigationBar
来源:互联网 发布:云考勤软件 编辑:程序博客网 时间:2024/05/18 09:09
UINavigationBar的常用方法
self.view.backgroundColor = [UIColor whiteColor];//设置navigationBar的背景图片
// [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@”map”] forBarMetrics:UIBarMetricsDefault];
//设置背景颜色self.navigationController.navigationBar.barTintColor = [UIColor redColor];//设置状态栏字体颜色/* UIBarStyleDefault = 0, //白底,字体黑色 UIBarStyleBlack = 1, //黑底,字体白色 UIBarStyleBlackOpaque = 1, // Deprecated. Use UIBarStyleBlack UIBarStyleBlackTranslucent = 2, // Deprecated. Use UIBarStyleBlack and set the translucent property to YES */self.navigationController.navigationBar.barStyle = UIBarStyleBlack;//设置导航栏是否透明//不透明 UI控件自动下移64self.navigationController.navigationBar.translucent = NO;//不带动画移动navigationBar
// self.navigationController.navigationBarHidden = YES;
//系统默认toolBar是隐藏 //坐标44self.navigationController.toolbarHidden = NO;UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:nil action:nil];UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:nil action:nil];UIBarButtonItem *item3 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:nil action:nil];//平等分割符号UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];space.width = 120;//UIBarButtonSystemItemFlexibleSpace 自动给你算分隔距离,来达到布满屏幕的效果//UIBarButtonSystemItemFixedSpace 固定间距.需要设置withself.toolbarItems = @[item1,space,item2,space,item3];
0 0
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- UINavigationBar
- uinavigationbar
- UINavigationBar + UISegmentedControl
- UINavigationController,UINavigationBar
- UINavigationBar 贴图
- 定制UINavigationBar
- 自定义UINavigationBar
- 自定义UINavigationBar
- UINavigationBar.h
- sql 题
- lightoj-1410-Consistent Verdicts【思维】
- Android -- 图片加载常用库
- 今天再给大家带点html5前端开发的干货模板“text/tpl”怎么用 script template怎么用
- OpenCV中基于Haar特征和级联分类器的人脸检测
- UINavigationBar
- Android命名规范
- java标识符&&关键字
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- Uva 11624 - Fire!
- handler.post 为什么要将thread对象post到handler中执行呢?
- eclipse中格式化代码快捷键Ctrl+Shift+F失效
- Android 面试--小知识点
- unity3d 更换项目字体