iOS7 tableview cell.imageview extra padding?

前端 未结 2 509
难免孤独
难免孤独 2020-12-16 06:28

I have a tableview which renders perfectly in iOS 6 & has done so for years. In iO7 in the same tableview either side of the cell.imageview its adding some extra padding

2条回答
  •  有刺的猬
    2020-12-16 07:09

    I probably had the same problem, the only thing that workd for me is setting the image frame:

    cell.imageView.frame = CGRectMake( 0, 0, 50, 55 );
    

    And if you are subclassing the cell, better to do:

    - (void) layoutSubviews
    {
        [super layoutSubviews];
        self.imageView.frame = CGRectMake( 0, 0, 50, 55 );
    }
    

提交回复
热议问题