当我使用掩码时,UITableView无法正常工作



我的Tableview只加载了4个单元格,但我有25个单元格。。。从表视图滚动到25 itens,但单元格是清晰的。。。单元格的背景是白色的,单元格5到25的背景都是透明的背景并且是空的。。。我确实在[listaPins计数]中设置了一个断点,实际上有25个itens。。

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [_listaPins count];
}

仅呼叫4次

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

编辑我确实发现我评论了这段代码,表视图工作得很好。但是这个怎么了?

UIBezierPath *maskPath;
maskPath = [UIBezierPath bezierPathWithRoundedRect:_tbFeeds.bounds byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerTopRight) cornerRadii:CGSizeMake(9.0, 9.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = _tbFeeds.bounds;
maskLayer.path = maskPath.CGPath;
_tbFeeds.layer.mask = maskLayer;
[maskLayer release];

代码看起来很完美。请在掩蔽时检查表的框架。试着记录它。休息,一切看起来都很好。