Using background view for UITableViewCell in iOS 7 covers default delete button

后端 未结 6 541
[愿得一人]
[愿得一人] 2021-01-12 02:38

I am using background view for UITableviewCell which is an imageview, I am using the image view to achieve two side corners for first and last cell. It is working fine But t

6条回答
  •  没有蜡笔的小新
    2021-01-12 03:34

    I was facing the same issue and finally got solution. Try this: Instead of calling setBackgroundImage in cellForRowAtIndexPath (Delegate Method). Call it in willDisplayCell:

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
    {
        cell.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"cellList.png"]];
    }
    

    Enjoy Coding

提交回复
热议问题