//加载NavigationBar的背景图片 UINavigationController *navController = [self navigationController]; UINavigationBar *navBar = [navController navigationBar]; CGSize navSize = CGSizeMake(navBar.frame.size.width, navBar.frame.size.height); UIImage *scaledImage = [self scaleToSize:[UIImage imageNamed:@"wall-header_title.png"] size:navSize]; [navBar setBackgroundImage:scaledImage forBarMetrics: UIBarMetricsDefault]; //改变 rightBarButtonItem 形状 UIBarButtonItem * item = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"btn_header_update_normal.png"]]]; self.navigationItem.rightBarButtonItem = item; - (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)newsize{ // 创建一个bitmap的context // 并把它设置成为当前正在使用的context UIGraphicsBeginImageContext(newsize); // 绘制改变大小的图片 [img drawInRect:CGRectMake(0, 0, newsize.width, newsize.height)]; // 从当前context中创建一个改变大小后的图片 UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext(); // 使当前的context出堆栈 UIGraphicsEndImageContext(); // 返回新的改变大小后的图片 return scaledImage; } // BackButton页面 if([self.navigationController.viewControllers objectAtIndex:0] != self) { UIButton *backButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; [backButton setImage:[UIImage imageNamed:@"btn_header_prev_normal.png"] forState:UIControlStateNormal]; [backButton setShowsTouchWhenHighlighted:TRUE]; [backButton addTarget:self action:@selector(popViewControllerWithAnimation) forControlEvents:UIControlEventTouchDown]; UIBarButtonItem *barBackItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; self.navigationItem.hidesBackButton = TRUE; self.navigationItem.leftBarButtonItem = barBackItem; }
相关推荐
Customize Rules 使用附件中的 myrules 中的内容覆盖 Customize 的内容然后保存
修复MyEclipse点击Customize Perspective没有反应
这个压缩包包含myeclipse_2014_customize_perspective修复bug工具
Customize Word 2013 Keyboard Shortcuts
Building Tools with GitHub Customize Your Workflow 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,...
Building Tools with GitHub Customize Your Workflow 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
前端开源库-customize-engine-handlebars自定义引擎把手,将把手用作自定义引擎
customize sort.txt
解决myeclipse2014版本中不能启动Customize Perspective的替换补丁
customize
Qt仿照谷歌浏览器的Tab标签页,该Demo实现了新的谷歌浏览器的标签的外观和旧的谷歌浏览器的标签。简单的绘制了一下,如果需要也可以找我,共同学习,交流进步。zhouyohu@163.com
myeclipse 2014 customize persperctive 无法 打开 修复 myeclipse 2014 customize persperctive 无法 打开 修复
customize_service.py
将插件安装在Redmine插件目录中,将此存储view_customize为view_customize : cd {RAILS_ROOT}/plugins git clone https://github.com/onozaty/redmine-view-customize.git view_customize cd ../ bundle install -...
Customize UI in a LabVIEW application介绍了在LabVIEW中构建有效用户界面的提示和技巧。在LabVIEW中进行编码的一个主要好处是提供了内置的控制和指标库。由于LabVIEW在设计时充分考虑了工程师和科学家,因此该库...
myeclipse2014Customize Persperctive失效
Myclipse2014 Customize Persperctive失效解决方案
Customize_checbox_src.zip
Presentation from Critical Path Training.
关于customize.css Customize.css 是一个小的 css 文件,用于改进用户代理样式表值 ...框架中不存在且许多开发人员和程序员不知道的最重要功能之一是能够更改滚动条的形状,这为客户提供了具有吸引力的外观。 :: -we