码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
UIScreen类
CGRect screenBounds = [ [UIScreen mainScreen]bounds];//返回的是带有状态栏的Rect NSLog(@"%@", NSStringFromCGRect(screenBounds)); CGRect viewBounds = [ [U...
分类:其他好文   时间:2014-06-26 21:12:57    阅读次数:173
UIView-(frame,center,bounds,tag,transform)用法
frame:表示控件的位置和尺寸(以父控件的左上角为坐标原点(0,0))可以调整控件的大小和位置1 CGRect frame = _btn.frame;2 frame.origin.y -= 50;3 _btn.frame = frame;center:表示控件的中点(以父控件的左上角为坐标原点)可...
分类:其他好文   时间:2014-06-26 15:04:54    阅读次数:189
tableview适配
//#define IOS7_OR_LATER ( [[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending )- (void)setFrame:(CGRect)frame { if (I...
分类:其他好文   时间:2014-06-22 23:54:13    阅读次数:363
计算文本宽高
// 计算文字的宽高 NSDictionary *attributesDic = @{NSFontAttributeName: self.labelView.font}; CGRect textRect = [text boundingRectWithSize:CGSizeMake(200, 1.....
分类:其他好文   时间:2014-06-21 17:21:23    阅读次数:225
UIButton
1 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; 2 CGRect frame = CGRectMake(40, 180, 240, 32); 3 4 btn.frame = frame...
分类:其他好文   时间:2014-06-20 20:39:56    阅读次数:209
iOS开发UI篇—Quartz2D使用(矩阵操作)
iOS开发UI篇—Quartz2D使用(矩阵操作)一、关于矩阵操作1.画一个四边形通过设置两个端点(长和宽)来完成一个四边形的绘制。代码: 1 - (void)drawRect:(CGRect)rect 2 { 3 //画四边形 4 //获取图形上下文 5 CGContext...
分类:移动开发   时间:2014-06-12 09:46:49    阅读次数:307
iOS开发UI篇—Quartz2D使用(图片剪切)
iOS开发UI篇—Quartz2D使用(图片剪切)一、使用Quartz2D完成图片剪切1.把图片显示在自定义的view中先把图片绘制到view上。按照原始大小,把图片绘制到一个点上。代码:1 - (void)drawRect:(CGRect)rect2 {3 UIImage *image2=...
分类:移动开发   时间:2014-06-12 08:29:26    阅读次数:300
ios动态创建UIView
- (id)initWithFrame:(CGRect)frame; // default initializer// (CGRect)frame:UIView的大小创建一个UIView- (void)viewDidLoad{ UIView *v = [[UIView all...
分类:移动开发   时间:2014-06-09 14:54:00    阅读次数:393
583条   上一页 1 ... 55 56 57 58 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!