when you want to manually resize views and automatically resize, the layoutSubViews method is called
-(void)layoutSubviews { [super layoutSubviews]; CGRect contentRect = self.contentView.bounds; CGFloat boundsX = contentRect.origin.x; CGRect frame,itemlabelframe,statuslabelframe; frame= CGRectMake(boundsX+1 ,0, 97, 50); itemlabelframe=CGRectMake(boundsX+100, 0, 155, 50); statuslabelframe=CGRectMake(boundsX+257, 0, 50, 50); ItemDescButton.frame=itemlabelframe; priorityButton.frame = frame; statusButton.frame=statuslabelframe;
Mahesh aswathanarayana
source share