Rotate a custom UITableViewCell

前端 未结 6 503
有刺的猬
有刺的猬 2020-12-29 14:36

I have a custom UITableViewCell which contains several UIButtons. Each button\'s frame position is relative to the cell width. I set autoresizingMask=UIViewAutoresizingFlexi

6条回答
  •  时光说笑
    2020-12-29 15:08

    Since UITableViewCell is also a UIView, you can override setFrame method. Everytime that your table view rotates, this method will be called for all cells.

    -(void)setFrame:(CGRect)frame
    {
        [super setFrame:frame];
    
        //Do your rotation stuffs here :)
    } 
    

提交回复
热议问题