摘要: 1 1、退回输入键盘 2 3 - (BOOL) textFieldShouldReturn:(id)textField{ 4 5 [textField resignFirstResponder]; 6 7 } 8 9 2、CGRect 10 11 CGRect frame = CGRectMake (origin.x, origin.y, size.width, size.height);矩形 12 13 NSStringFromCGRect(someCG) 把CGRect结构转变为格式化字符串; 14 15 CGRectFromString(a... 阅读全文
posted @ 2013-11-12 22:27 yyh123 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 1 Block的使用: 2 注意,block要用copy策略 3 @interface TGDealBottomMenu : UIView 4 5 @property (nonatomic, copy) void (^hideBlock)();//定义一个block 6 7 8 9 在TGDealBottomMenu.m文件中这样调用:10 注意:首先要判断是否为nil,如果不为空,再调用11 if (_hideBlock) {12 _hideBlock();13 14 }15 16 17 //如下所示,当block对象为成员变量时18 @interface ... 阅读全文
posted @ 2013-11-12 01:29 yyh123 阅读(395) 评论(0) 推荐(0) 编辑