码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
黑马程序员-------oc中的结构体
------Java培训、Android培训、iOS培训、.Net培训、期待与您交流! -------oc中的结构体主要有CGPoint,CGSize,CGRect,NSRange;/* Points. */struct CGPoint { CGFloat x; CGFloat y;};typede...
分类:其他好文   时间:2014-09-22 13:29:32    阅读次数:185
ios 自定义tabbar
.h文件:#import @interface YLYTabBar : UIView@end.m文件#import "YLYTabBar.h"@implementation YLYTabBar- (id)initWithFrame:(CGRect)frame{ self = [super in...
分类:移动开发   时间:2014-09-20 14:56:58    阅读次数:230
CGRect
/* rect(x,y,width,height); width, height正负代表了从原点的绘制方向,矩形的长宽都是取得绝对值 */ // Do any additional setup after loading the view, typically from a nib.#prag...
分类:其他好文   时间:2014-09-19 13:39:25    阅读次数:286
CGGeometry.h 文件详解
这些是在CGGeometry.h里的 CGPoint、CGSize、CGRect、CGRectEdge实际上都是结构体struct CGPoint { CGFloat x; CGFloat y;};typedef struct CGPoint CGPoint;struct CGSize { CGFl...
分类:其他好文   时间:2014-09-18 13:07:15    阅读次数:243
Chapter 5 带颜色的同心圆
一、重写 DrwaRect-(void)drawRect:(CGRect)rect{ CGRect bounds = self.bounds; CGPoint center; center.x = bounds.origin.x + bounds.size.width / ...
分类:其他好文   时间:2014-09-16 14:12:50    阅读次数:200
StoryBoard中使用xib
转自:http://blog.csdn.net/li6185377/article/details/8131042一般自定义View 代码方式 有 在初始化的时候添加 子Views[cpp]view plaincopy-(id)initWithFrame:(CGRect)frame{self=[su...
分类:其他好文   时间:2014-09-15 12:37:18    阅读次数:217
自定义引导视图
#pragma mark - 创建引导页+ (id)initWithFrame:(CGRect)frame{ return [[self alloc] initWithFrame:frame];}//- (id)initWithFrame:(CGRect)frame{ self = [s...
分类:其他好文   时间:2014-09-13 22:39:26    阅读次数:213
initWithFrame和initWithCoder使用技巧,以及他们什么时候被调用,自定义控件必须具备三个方法initWithFrame和initWithCoder以及drawRect
//当你通过代码创建控件就会调用这个方法- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { [self setup]; } return self;}//当你通过storyboared或...
分类:其他好文   时间:2014-09-11 22:19:52    阅读次数:273
自定义View相关
实现自定义View的关键是重载UIView的drawRect: 方法,因为主要是通过重载这个方法,来改变view的外观。例如:- (void)drawRect:(CGRect)rect { // 绘图 CGRect bounds = [self bounds]; // Where ...
分类:其他好文   时间:2014-09-05 00:53:10    阅读次数:274
boundingRectWithSize 的使用, 计算UILable高度, 包含Emoji及多属性string.
iOS的文字高度计算一直是个问题, 苹果也一直在改, 这几天看了一下boundingRectWithSize方法.- (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options context:(...
分类:其他好文   时间:2014-09-04 13:13:19    阅读次数:314
583条   上一页 1 ... 50 51 52 53 54 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!