开发者

iPhone : UITableViewCell: cell carry background color strip

When i used

self.view.backgroundColor开发者_JAVA技巧 = [UIColor colorWithPatternImage: 
                                     [UIImage imageNamed:@"image_name.png"]];  

the cell carry bottom part of image and it looks like strip on view


Use the following method to set cell height exactly the same as your image's height:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

Also you might want to remove separators depending on how your image looks using the following code:

MyTableName.separatorStyle = UITableViewCellSeparatorStyleNone;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜