UITableViewCell Portait/Landscape problem

Discussion in 'iOS Development' started by NolesFans, Feb 3, 2009.

  1. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    Code:
    - (void)layoutSubviews {
        [super layoutSubviews];
        CGRect contentRect = self.contentView.bounds;
    	
        if (!self.editing) {
            CGFloat boundsX = contentRect.origin.x;
    		
    		dateLabel.frame = CGRectMake(boundsX + 5, 13, 160, 19);
    		oppLabel.frame = CGRectMake(boundsX + 53, 13, 200, 19);
    		timeLabel.frame = CGRectMake(boundsX + 225, 13, 75, 19);
    	}
    }
    This is works on the Portrait mode. If you tried it is in the landscape mode where there is a big gap in the cell. I really want to done this correctly.

Share This Page