- 浏览: 38665 次
文章分类
最新评论
-
peng13123:
...
Hibernate4+Spring3+SpringMVC -
peng13123:
好吧,呵呵zxxwlj 写道 翻/墙?违法。。。
我想问为啥我goagent的文章被删除了 -
zxxwlj:
翻/墙?违法。。。
我想问为啥我goagent的文章被删除了
#pragma mark 设置全局navigation barbuttonitem
-(void)setNaviBarButtonItemImage:(NSString *)imageName andX:(NSInteger)x andY:(NSInteger)y andW:(NSInteger)w andH:(NSInteger)h andTitle:(NSString *)title andSel:(SEL)sel andLOrR:(NSString *)lOr andTitleColor:(UIColor *)color{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame =CGRectMake(x,y,w,h);
[btn setTitle:title forState:UIControlStateNormal];
if (imageName.length==0 && title.length==0) {
} else if (imageName.length==0 && title.length!=0) {
[btn setBackgroundColor:[UIColor clearColor]];
[btn setTitleColor:color forState:UIControlStateNormal];
}else if(imageName.length!=0 && title.length==0){
UIImage *image = [UIImage imageNamed:imageName];
[btn setImage:image forState:UIControlStateNormal];
}else if(imageName.length!=0 && title.length!=0){
UIImage *image = [UIImage imageNamed:imageName];
[btn setBackgroundImage:image forState:UIControlStateNormal];
[btn setBackgroundColor:[UIColor clearColor]];
[btn setTitleColor:color forState:UIControlStateNormal];
}
[btn addTarget: self action:sel forControlEvents: UIControlEventTouchUpInside];
UIBarButtonItem *bBtn = [[UIBarButtonItem alloc]initWithCustomView:btn];
if ([lOr isEqualToString:@"left"]) {
[self.navigationItem setLeftBarButtonItem:bBtn];
}else{
[self.navigationItem setRightBarButtonItem:bBtn];
}
}
-(void)setNaviBarButtonItemImage:(NSString *)imageName andX:(NSInteger)x andY:(NSInteger)y andW:(NSInteger)w andH:(NSInteger)h andTitle:(NSString *)title andSel:(SEL)sel andLOrR:(NSString *)lOr andTitleColor:(UIColor *)color{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame =CGRectMake(x,y,w,h);
[btn setTitle:title forState:UIControlStateNormal];
if (imageName.length==0 && title.length==0) {
} else if (imageName.length==0 && title.length!=0) {
[btn setBackgroundColor:[UIColor clearColor]];
[btn setTitleColor:color forState:UIControlStateNormal];
}else if(imageName.length!=0 && title.length==0){
UIImage *image = [UIImage imageNamed:imageName];
[btn setImage:image forState:UIControlStateNormal];
}else if(imageName.length!=0 && title.length!=0){
UIImage *image = [UIImage imageNamed:imageName];
[btn setBackgroundImage:image forState:UIControlStateNormal];
[btn setBackgroundColor:[UIColor clearColor]];
[btn setTitleColor:color forState:UIControlStateNormal];
}
[btn addTarget: self action:sel forControlEvents: UIControlEventTouchUpInside];
UIBarButtonItem *bBtn = [[UIBarButtonItem alloc]initWithCustomView:btn];
if ([lOr isEqualToString:@"left"]) {
[self.navigationItem setLeftBarButtonItem:bBtn];
}else{
[self.navigationItem setRightBarButtonItem:bBtn];
}
}
发表评论
-
Xcode7 ios9不能用http请求
2015-09-17 18:49 625Xcode7 使用NSURLSession发送HTTP请求的问 ... -
iOS UITableViewCell 中 调整imageView 的图片大小
2015-08-26 16:10 1294//设置图片 [cell.imageView setImage ... -
[转]iOS 万能跳转界面方法 (runtime实用篇一)
2015-08-24 10:27 538在开发项目中,会有这样变态的需求: 推送:根据服务端推送过来 ... -
周堋斐:梦想的开发者
2015-04-13 17:56 012年的深圳软件园也是各种。呵呵哒 -
IOS判断app在appstore是否有可用的更新
2015-03-13 10:25 494iTunes可以提供app的版本信息,主要通过appid获取, ... -
uitableview分割线 左右边距相同
2015-01-21 15:59 2481_myTableView1.separatorInset= ... -
在uiimageview中设置网络图片等比例大小
2014-12-30 15:38 687NSData *data=[NSData dataWith ... -
[转]iOS UISCrollView循环滚动 实现
2014-12-30 13:42 645google了半天发现很多人竟然搞不定,甚至还有人用数组左移右 ... -
push的时候,感觉上一个页面的视图还有残留,然后停顿了一下,才消失的解决
2014-12-10 20:04 1799这个,以前遇到过,后来不知怎么弄好了,现在就是你如果改下pus ... -
view整体上移
2014-11-26 16:06 732如果你准备将你的老的 iOS 6 app 迁移到 iOS 7/ ... -
广告轮播
2014-11-17 20:05 429h <UIAlertViewDelegate,UIScr ... -
nsdate 前一天,后一天
2014-11-17 19:57 1119h { NSDate *choseDate;//显示日 ... -
sdwebimage ios8 报错
2014-11-02 00:22 612报错:Use of undeclared identifier ... -
之前有人整理过Git上好用的iOS库,我搬运一下
2014-10-31 14:56 277之前有人整理过Git上好用的iOS库,我搬运一下: http: ... -
ios中添加和移除view
2014-08-14 11:36 786la = [[UILabel alloc]init]; ... -
UITextField只能输入数字且小数点后保留2位
2014-07-18 17:17 524#pragma mark UITextFieldDeleg ... -
NSTimer倒计时
2014-07-17 10:56 494// [NSTimer scheduledTimerWithT ... -
转】视图切换总结
2014-06-04 12:06 5071、利用ModalViewController切换View ... -
ios 判断网络连接以及获取路由信息
2014-05-29 11:53 1627首先 引入 Reachability.h 和Reachabil ... -
UINavigationController如何连续返回两级/回到第一级
2014-01-18 09:44 758//连续返回两级 int index=[[self.navig ...
相关推荐
ROS 与 navigation 教程-编写自定义全局路径规划 ROS 与 navigation 教程-stage 仿真 ROS 与 navigation 教程-示例-激光发布(C++) ROS 与 navigation 教程-示例-里程发布(C++) ROS 与 navigation ...
前言:解决项目中有多个端的情况 效果图: 1:app\build.gradle中添加依赖: android x : ...public class MainActivity extends AppCompatActivity implements BottomNavigationView.OnNavigation
Navigation for ASP.NET Web Forms manages movement and data passing between ASPX pages in a unit-testable manner. There is no client-side logic, so it works in all browsers, and no server-side cache, ...
ROS中navigation解析,以及全局路径规划讲解以及怎么写一个1自己的全局路径规划。
Outdoor Navigation 是一款非常实用的户外导航软件。软件会根据用户当前的位置在地图上进行定位,并且在界面上显示用户位置的经纬度以及方向。另外有一点功能非常强大,就是软件在定位的同时会自动将您平时所拍的...
今年三月Google已经将Bottom Navigation加入到Material中,但是目前还没有这方面的使用教程,所以本demo介绍使用LuseenBottomNavigation。
想过为你的博客添加自定义的导航没,Simple Sidebar Navigation这款插件可以帮你实现这个想法,它可以让你的博客导航看上去更加的明朗,方便访客的访问,当插件安装好后,你不需要修改、添加任何代码,就可以使用了...
The subject of integrated navigation systems covered in this book is designed for those directly involved with the design, integration, and test and evaluation of navigation systems. It is assumed ...
What is navigation anyway? It is the ability to set the course of a ship to move between two desired locations. To do that the navigator must be able to know his location and set the velocity vector ...
AndroidNavigation A library managing nested Fragment, translucent StatusBar and Toolbar for ...一处设置全局样式,到处使用,并且支持不同页面个性化 支持侧滑返回 支持懒加载 支持 font icons 6.0 screenshot
unity2D寻路Navigation2D (Pathfinding for 2D Games) V1.27 要求Unity 2017.4.1 或更高版本。 Navigation2D uses Unity's built-in Navigation system to make 2D pathfinding possible without any axis ...
Happy New Year 2011 is a Free Flash Navigation of New Year, and you can Custom the Links by xml files. This Flash navigation has Gallery automatically display, beautiful snowflake pattern, and you can...
Global Navigation Satellite Systems, Inertial Navigation, and Integration
Android 使用BottomNavigationView实现底部导航栏,在Android Support Library 25 中增加了 BottomNavigationView 控件,官方为我们提供了这样这一个控件。
初尝Android Jetpack 之Navigation组件,使用Navigation实现对应导航实践
android navigation
ReactNavigation - 带有自定义动画的TabBarComponent
自定义tabbar+navigation