码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
绘制图形-移动,旋转,阴影,渐变
// Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect {     UIBezierPath *path = [UI...
分类:移动开发   时间:2015-07-01 22:19:53    阅读次数:259
Xcode 使用技巧 (不定时更新)
1. snippets, 使用和创建可重用代码块:比如将以下代码可重用:#pragma mark - setup-(void)awakeFromNib{ [self setup];}-(void)setup{}-(instancetype)initWithFrame:(CGRect)frame{ s...
分类:其他好文   时间:2015-06-30 21:53:21    阅读次数:122
ios绘图
#import "LCSView.h" @implementation LCSView ////绘图 - (void)drawRect:(CGRect)rect {      #if 0     //图形上下文对象     CGContextRef context = UIGraphicsGetCurrentContext();  ...
分类:移动开发   时间:2015-06-30 18:21:10    阅读次数:221
iOS cell紧贴导航栏
//确保第一区域紧贴导航栏- (void)viewWillAppear:(BOOL)animated{ CGRect frame = _tableView.tableHeaderView.frame; frame.size.height = 1; UIView *headerView = [[...
分类:移动开发   时间:2015-06-30 18:12:55    阅读次数:252
利用webview显示gif动画
利用webview显示gif动画 CGRect frame = CGRectMake(50,50,0,0);     frame.size = [UIImage imageNamed:@"1.gif"].size;     // 读取gif图片数据     NSData *gif = [NSData dataWithContentsOfFile: [[NSBu...
分类:Web程序   时间:2015-06-26 18:13:38    阅读次数:190
每个Cell高度不一致的一般做法:
1.自定义一个 Cell,在 initWithStyle:reuseIdentifier: 构造方法中添加所有需要显示的子控件2.新建一个模型类,比如 CellFrameModel,作用是:描述一个自定义 Cell 内部所有子控件的 frame 属性* 提供一系列 CGRect 类型的属性给自定义 ...
分类:其他好文   时间:2015-06-26 17:29:23    阅读次数:84
数据类型之一几何数据类型(CGPoint,CGSize,CGRect)
// CGPoint 结构体数据原型, 用于声明一个点; 02./* Points. */ 03.? 04.struct CGPoint { 05.CGFloat x; 06.CGFloat y; 07.}; 08.typedef struct CGPoint CGPoint; 09.? 10.typedef CGPoint NSPoint; 11.? ...
分类:其他好文   时间:2015-06-24 11:08:30    阅读次数:133
iOS view的frame和bounds之区别(位置和大小)
一、首先列一下公认的资料:先看到下面的代码你肯定就明白了一些:123456-(CGRect)frame{returnCGRectMake(self.frame.origin.x,self.frame.origin.y,self.frame.size.width,self.frame.size.hei...
分类:移动开发   时间:2015-06-23 15:22:10    阅读次数:123
Button
?通过修改控件的frame属性就可以修改控件在屏幕上的位置和尺寸?比如点击“向上”按钮,让按钮的y值减小即可- (IBAction)top:(UIButton *)sender { CGRect btnFrame = self.headBtn.frame; btnFrame.origin.y -= ...
分类:其他好文   时间:2015-06-23 13:22:32    阅读次数:100
< Objective-C >常用结构体
系统定义的常用结构体NSRangeNSPoint (CGPoint)NSSize (CGSize)NSRect (CGRect)常用的结构体方法初始化NSMakeRangeCGPointMakeCGSizeMakeCGRectMake打印结构体,返回字符串- (NSString *) NSStrin...
分类:其他好文   时间:2015-06-17 11:16:08    阅读次数:118
583条   上一页 1 ... 32 33 34 35 36 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!