美文网首页
ios,UITableview 的section或者cell上面

ios,UITableview 的section或者cell上面

作者: nkk | 来源:发表于2019-07-09 10:23 被阅读0次

-(void)leftBtnClick:(UIButton*)sender

{

    UIView *btnView = (UIView *)sender.superview.superview;

    CGRect rect = [btnView convertRect:sender.frame toView:self.view];

    NSLog(@"left ----%@ ",NSStringFromCGRect(rect));

}

通过superview 找到 该btn  通过 convertRect 方法找到在当前界面的frame位置

相关文章

网友评论

      本文标题:ios,UITableview 的section或者cell上面

      本文链接:https://www.haomeiwen.com/subject/vovtkctx.html