Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 是否在滚动时禁用UITableView?_Objective C_Ios_Uitableview - Fatal编程技术网

Objective c 是否在滚动时禁用UITableView?

Objective c 是否在滚动时禁用UITableView?,objective-c,ios,uitableview,Objective C,Ios,Uitableview,我刚刚意识到,如果我使用此代码仅对我的UITableView的上两个边缘进行圆角处理: UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:thetableView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight

我刚刚意识到,如果我使用此代码仅对我的
UITableView
的上两个边缘进行圆角处理:

UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:thetableView.bounds 
                                                   byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight
                                                         cornerRadii:CGSizeMake(10.0, 10.0)];
    // Create the shape layer and set its path
    CAShapeLayer *maskLayer = [CAShapeLayer layer];
    maskLayer.frame = thetableView.bounds;
    maskLayer.path = maskPath.CGPath;
    thetableView.layer.mask = maskLayer;
如果我向下滚动到我在Interface Builder中创建的
UITableView
框架下的任何内容,我的tableview内容将被切断。虽然如果我去掉这个代码,一切都很好

有没有一种方法可以让两个世界都得到最好的效果,我可以绕过顶部的角落,而原始框架下的内容不会被截取


谢谢

这是解决方案。在外部UIView中封闭表视图(与表视图大小完全相同,封闭视图中的表视图为0,0)。然后将插座连接到封闭视图,并在其上设置圆角

我认为这是苹果方面的一个缺陷