码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
给自定义cell设置分隔线的不同做法
1.给cell添加一个UIView,设置UIView的高度为1,并设置这个UIView的左、下、右约束。2.不需要给cell添加任何控件,重写cell的- (void)setFrame:(CGRect)frame方法- (void)setFrame:(CGRect)frame{ frame.s...
分类:其他好文   时间:2015-09-07 01:50:36    阅读次数:147
Quartz2D的学习2
1 - (void)drawRect:(CGRect)rect { 2 3 NSLog(@"drawRect"); 4 5 //获取图形的上下文 6 CGContextRef context = UIGraphicsGetCurrentCon...
分类:其他好文   时间:2015-09-06 20:15:01    阅读次数:247
UIImage与UIColor互转
Objective-C UIColor -> UIImage -?(UIImage*)?createImageWithColor:?(UIColor*)?color { ????CGRect?rect=CGRectMake(0.0f,?0.0f,?1.0f,?1.0f); ????UIGraphicsBeginImageContext(rect.size);...
分类:其他好文   时间:2015-09-06 14:45:02    阅读次数:189
ios 获取屏幕的属性和宽度
去掉状态栏尺寸 CGRect?r = [?UIScreen?mainScreen ].applicationFrame; r=0,20,320,460 屏幕尺寸 CGRect?rx = [?UIScreen?mainScreen ].bounds; r=0,0,320,480 状态栏尺寸 CGRect?rect;? rect?=...
分类:移动开发   时间:2015-09-02 16:04:48    阅读次数:141
贝塞尔曲线
第一种加载方法- (void)drawRect:(CGRect)rect { UIBezierPath *backPath = [UIBezierPath bezierPath]; [backPath moveToPoint:CGPointMake(0, 0)]; [backPat...
分类:其他好文   时间:2015-09-01 21:30:22    阅读次数:259
Swift UIView 层次调整
Swift 中添加的UIView都是有层级的。 我们先添加三个看一看 let view1=UIView(frame: CGRectMake(10, 50, 200, 200)) let view2=UIView(frame: CGRectMake(60, 100, 200, 200)) let view3=UIView(frame: CGRect...
分类:编程语言   时间:2015-08-30 19:38:14    阅读次数:131
利用Quartz2D-contex绘制文本
//获取上下文 CGContextRef context =UIGraphicsGetCurrentContext(); //线条加粗 CGContextSetLineWidth(context , 5);CGContextSetLineWidth(context, 5); CGRect rect ...
分类:其他好文   时间:2015-08-29 09:39:17    阅读次数:142
1、iOS 开发之基础控件
1、UIView的常见的属性@property(nonatomic) CGRect frame; @property(nonatomic) CGRect bounds; @property(nonatomic) CGPoint center; @property(nonatomic) CGAffineTransform transfor...
分类:移动开发   时间:2015-08-29 06:19:43    阅读次数:210
把图片切成圆角代码
static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight){ float fw, fh; if (ovalWi...
分类:其他好文   时间:2015-08-28 15:27:44    阅读次数:124
[Label] 文字前距离
class UILabelOverride: UILabel { override func textRectForBounds(bounds: CGRect, limitedToNumberOfLines numberOfLines: Int) -> CGRect { ...
分类:其他好文   时间:2015-08-27 18:24:05    阅读次数:163
583条   上一页 1 ... 25 26 27 28 29 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!