3
我意識到,如果我使用此代碼圓只有前2邊我UITableView
: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;
我的tableview內容將得到切斷,如果我向下滾動到任何東西,是UITableView
的框架之下我在Interface Builder中做的。雖然如果我把這個代碼拿出來,一切都很好。
是否有一種方式來獲得兩全其美,我可以圓的上角和原始幀以下內容不會被切斷的?
謝謝!