self.navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, NAV_BAR_HEIGHT)]; [self.navBar setBackgroundImage:[UIImage imageWithColor:[UIColor clearColor]] for...
分类:
其他好文 时间:
2015-06-19 00:06:44
阅读次数:
161
参考:http://blog.csdn.net/djl4104804/article/details/7312662今天,需要自己画线,并保存线模型,同时虚线部分要透明,采用如下方法: - (UIImage*)lineImage:(UIColor *)color lineWidth:(float)w...
分类:
移动开发 时间:
2015-06-16 14:30:19
阅读次数:
3013
这个我们就是可以直接宏定义到 我们的工程中,这样我们就可以用我们UI小妹,给我们16进制的颜色表示,愉快的编程了。。。#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16...
分类:
移动开发 时间:
2015-06-15 14:23:51
阅读次数:
107
1.iOS 7后隐藏UITextField的光标 通常我们用UIPickerView作为我们的UITextField的inputView时,我们是需要隐藏光标的。当然,如果想换个光标颜色,也是这么处理。1 textFiled.tintColor = [UIColor clearColor]; 这.....
分类:
移动开发 时间:
2015-06-15 12:41:53
阅读次数:
314
CGRect rect = [UIScreen mainScreen].bounds; ? ? _friendsCircleTitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,140, 44)]; ? ? _friendsCircleTitleView.backgroundColor = [UIColor clearCo...
分类:
移动开发 时间:
2015-06-14 21:30:38
阅读次数:
449
其实iOS Tabbar的可定制性非常高,我们没有必要重复造轮子,下面是笔者收集的一些tabbar的常用设置,希望对大家有所帮助。
设置tabbar选中颜色
iOS7设置如下:
[self.tabBarController.tabBarsetSelectedImageTintColor:[UIColor greenColor]];
ios8中如下设置:
self.ta...
分类:
移动开发 时间:
2015-06-11 16:51:50
阅读次数:
152
简单的利用
CoreGraphics
画一个小黄人
话不多说,全在代码里面,挺简单的一个东西
///画身体
void drawBody(CGContextRef context,CGRect rect)
{
///设置颜色
[[UIColor yellowColor] set];
CGFloat startX = 100;
CGFloat star...
分类:
其他好文 时间:
2015-06-10 17:30:34
阅读次数:
145
需求:想让这个view透明,但其上的内容不透明解决办法设置background color的颜色中的透明度例如:self.view.backgroundColor=[UIColor colorWithRed:28.0/255.0 green:160.0/255.0 blue:229.0/255.0 ...
分类:
其他好文 时间:
2015-06-10 17:03:05
阅读次数:
113
或用代码实现[TableView setSeparatorColor:[UIColor clearColor]];问题一用你给的方法貌似不行,我用这个方法把分隔线给“去掉”了:[editViewController.tableView setBackgroundColor:[UIColor clea...
分类:
其他好文 时间:
2015-06-10 14:06:54
阅读次数:
104
UIButton *signBtn = [UIButton buttonWithType:UIButtonTypeCustom];
signBtn.frame = CGRectMake(0, 0, 80, 40);
[signBtn.layer setMasksToBounds:YES];
[signBtn.layer setCornerRadius:10.0]; //设置矩形四...
分类:
其他好文 时间:
2015-06-09 09:59:01
阅读次数:
139