ios--判断是否touch了某个View(winningView)

判断是否touch了某个View(winningView):

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint pt = [touch locationInView:self.view];
    //点击其他地方消失
    if (!CGRectContainsPoint([self.winningView frame], pt)) {
        //to-do
    }
}


ios--判断是否touch了某个View(winningView),布布扣,bubuko.com

ios--判断是否touch了某个View(winningView)

上一篇:Android - Fragment(碎片) 详解


下一篇:crontab文件的含义