-(void)touchesEnded:(NSSet*)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:touch.view]; if(!CGRectContainsPoint(self.calendarView.frame, point)){ [self removeFromSuperview]; }}
本文共 328 字,大约阅读时间需要 1 分钟。
-(void)touchesEnded:(NSSet*)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:touch.view]; if(!CGRectContainsPoint(self.calendarView.frame, point)){ [self removeFromSuperview]; }}
转载于:https://my.oschina.net/u/2519763/blog/805106