NSValue可以将c类型转换为Objective-C对象,如NSRange,CGPoint,CGSize,CGRect,CGVector,UIEdgeInsets,UIOffset...
分类:
其他好文 时间:
2014-10-11 14:08:15
阅读次数:
105
objective-c 中数据类型之一 几何数据类型(CGPoint,CGSize,CGRect)...
分类:
其他好文 时间:
2014-10-11 13:23:05
阅读次数:
134
- (CGRect)backgroundRectForBounds:(CGRect)bounds; //返回背景边界 (image + title)- (CGRect)contentRectForBounds:(CGRect)bounds; //- (CGRect)titleRectForCont....
分类:
其他好文 时间:
2014-10-11 11:07:55
阅读次数:
192
@interface UIView : UIResponder/*** 通过一个frame来初始化一个UI控件*/- (id)initWithFrame:(CGRect)frame;// YES:能够跟用户进行交互@property(nonatomic,getter=isUserInteractio...
分类:
其他好文 时间:
2014-10-03 04:10:03
阅读次数:
260
//开始编辑输入框的时候,软键盘出现,执行此事件-(void)textFieldDidBeginEditing:(UITextField *)textField{ CGRect frame = [textField convertRect:textField.frame toView:self.v....
分类:
其他好文 时间:
2014-09-28 13:51:22
阅读次数:
205
@interface ShowLineView : UIView
-(void)drawRect:(CGRect)rect{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineCap(context, kCGLineCapSquare);//设置线条样式
CGC...
分类:
移动开发 时间:
2014-09-24 20:16:57
阅读次数:
358
1、创建一个drawboard#import "DrawBoard1.h"@implementation DrawBoard1-(void)drawRect:(CGRect)rect{ CGContextRef context=UIGraphicsGetCurrentContext(); CGC.....
分类:
其他好文 时间:
2014-09-23 01:29:23
阅读次数:
360
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextMoveToPoint(context, 0, 0); CGContextAddRect(c...
分类:
其他好文 时间:
2014-09-23 00:52:13
阅读次数:
223
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); //起点移动到(0,0) CGContextMoveToPoint(context, 0, 0); //画线到(100,...
分类:
其他好文 时间:
2014-09-22 22:22:23
阅读次数:
208
/** * 将UIColor变换为UIImage * **/+ (UIImage *)createImageWithColor:(UIColor *)color{ CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBe...
分类:
移动开发 时间:
2014-09-22 20:45:23
阅读次数:
198