如何判断一个view 是否在另外一个view 范围内?

来源:互联网 发布:windows搭建私有云 编辑:程序博客网 时间:2024/05/21 00:53
 CGRect rect = [_testButton convertRect:_testButton.frame toView:self.view];
    if (CGRectIntersectsRect(self.view.frame, rect)) {
        NSLog(@"true");
    }else{
        NSLog(@"false");
    }
0 0
原创粉丝点击