摘要: 1.长按手势触发方法默认要调用两次,一般根据手势的state来判断是began还是end状态来使该方法只处理一次 2.轻扫手势默认方向是向右,可通过direction设置上下左右方向。 一个轻扫手势只支持一个方向,如果需要一个控件支持多个方向的轻扫,必须创建多个轻扫手势 3.旋转手势的rotatio 阅读全文
posted @ 2015-06-04 18:27 Emyin 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 当子控件超出父控件的范围,那么点击超出的部分是不响应的,那么应该怎么办呢? 阅读全文
posted @ 2015-06-04 17:36 Emyin 阅读(639) 评论(0) 推荐(0) 编辑
摘要: UIViewController >UIView >testButton >testView 此时,从storyboard是无法拖线到testView的,但是在testView中写入: @property (nonatomic, weak) IBOutlet UIButton *btn; 然后拖线到 阅读全文
posted @ 2015-06-04 17:17 Emyin 阅读(133) 评论(0) 推荐(0) 编辑
摘要: UIApplication管理事件队列,当事件发生时,UIApplication把事件依次向下传,直到找到最适合的控件未知。 控件是通过- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event来寻找的。比如如果这个方法返回self,则 阅读全文
posted @ 2015-06-04 16:47 Emyin 阅读(837) 评论(0) 推荐(0) 编辑
摘要: // 加载storyboard UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; // 加载箭头指向的控制器 UIViewController *vc = [storyboard inst 阅读全文
posted @ 2015-06-04 13:07 Emyin 阅读(133) 评论(0) 推荐(0) 编辑
摘要: - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo; 阅读全文
posted @ 2015-06-04 11:27 Emyin 阅读(253) 评论(0) 推荐(0) 编辑