ios开发随记 用navigationbar 当栏 可以免于ios 7 和6 上下错位
来源:互联网 发布:java变量作用域 编辑:程序博客网 时间:2024/04/27 22:31
UIButton *searchBtn=[UIButton buttonWithType:UIButtonTypeCustom]; searchBtn.frame = CGRectMake(0, 0, 51, 30); [searchBtn setBackgroundImage:[UIImage imageNamed:@"but_rightbg.png"] forState:UIControlStateNormal]; [searchBtn setTitle:@"编辑" forState:UIControlStateNormal]; [searchBtn addTarget:self action:@selector(editBtnClick:) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *searchButton = [[UIBarButtonItem alloc] initWithCustomView:searchBtn]; self.navigationItem.rightBarButtonItem= searchButton; UIButton *backBtn=[UIButton buttonWithType:UIButtonTypeCustom]; backBtn.frame = CGRectMake(0, 0, 24, 24); [backBtn setBackgroundImage:[UIImage imageNamed:@"icon_back.png"] forState:UIControlStateNormal]; [backBtn addTarget:self action:@selector(backBtnClick) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *backBtn1 = [[UIBarButtonItem alloc] initWithCustomView:backBtn]; self.navigationItem.leftBarButtonItem= backBtn1; UILabel *navTitle =[[UILabel alloc] initWithFrame:CGRectMake(200, 0,120, 44)]; navTitle.backgroundColor =[UIColor clearColor]; navTitle.text = @"系统信息"; navTitle.font =[UIFont systemFontOfSize:28.0f]; navTitle.textColor =[UIColor whiteColor]; navTitle.textAlignment = NSTextAlignmentLeft; //UIBarButtonItem *navTitleBtn = [[UIBarButtonItem alloc] initWithCustomView:navTitle]; // self.navigationItem.leftBarButtonItem= navTitleBtn; self.navigationItem.titleView = navTitle ;
[self.firstNavView.navigationBar setBackgroundImage:[UIImage imageNamed:allNavImages] forBarMetrics:UIBarMetricsDefault];
0 0
- ios开发随记 用navigationbar 当栏 可以免于ios 7 和6 上下错位
- iOS开发:NavigationBar
- ios开发:导航栏navigationbar背景渐变
- ios 开发随记 SDWebImage
- iOS开发之-NavigationBar NavigationItem
- ios开发swift中NavigationBar
- iOS开发-设置NavigationBar的颜色和字体属性
- [iOS]隐藏NavigationBar和StatusBar
- IOS-NavigationBar
- iOS-NavigationBar
- <iOS>NavigationBar
- ios 开发随记 动画效果
- (iOS开发)导航栏navigationBar中间添加按钮
- iOS 自定义导航栏 NavigationBar
- iOS 7 NavigationBar 完全透明
- ios随记
- ios 随记
- iOS 随记
- 【Android病毒分析报告】 - AppPortal “恶意行为云端无限扩展”
- 41岁李冰冰水下拍性感写真(组图) 红衣血纱酷似吸血鬼女王
- Spring MVC 框架学习总结
- rnqoj 98 逃亡的准备 多重背包问题
- 回滚表空间大小设置
- ios开发随记 用navigationbar 当栏 可以免于ios 7 和6 上下错位
- 查看tcpdump数据
- linux下nginx+mysql+php安装配置
- hive merge小文件
- JSTL的错误“attribute test does not accept any expressions”解决方法
- 【iOS开发】协议与委托 (Protocol and Delegate) 实例解析
- 2014-03-13周四:对于HMODULE,Handle ,HMODULE ,HINSTANCE ,HWND
- hadoop使用笔记
- VS2010无法编译C++:fatal error LNK1123 转换到 COFF 期间失败