自定义了一个UITableViewCell,但是在显示在TableView中时,第一个Cell左上角和右上角显示的时候,没有圆角,检查了一下代码,将Cell子类中设置frame的语句屏蔽掉就可以了:

- (id)initWithStyle:(UITableViewCellStyle) style reuseIdentifier: (NSString *) reuseIdentifier 
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) 
    {
        //remove this line to keep first cell round-cornered.
        //[self setFrame:CGRectMake(0, 0, 320, 40)];

自定义UITableViewCell不能显示圆角的解决方法

自定义UITableViewCell不能显示圆角的解决方法

相关文章:

  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2018-11-25
猜你喜欢
  • 2021-12-27
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2021-12-08
相关资源
相似解决方案