Rotate a custom UITableViewCell

前端 未结 6 502
有刺的猬
有刺的猬 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:09

    The ticked answer works like a charm in old iOS versions. For iOS 6.0 I used the next code:

    static NSString *Identifier;
    if (self.interfaceOrientation==UIInterfaceOrientationPortrait) {
        Identifier=@"aCell_portrait";
    }
    else {
        Identifier=@"DocumentOptionIdentifier_Landscape";
    }
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Identifier];
    

提交回复
热议问题