I placed the button in my view using CGRectMake (x, x, x, x), x is the location and size of the course. When I rotate the view using - (BOOL) shouldAutoRotate ... I want to change the location of the button, starting from the center in portrait mode and ending with the center in landscape mode. The button contains information on the label that the user sets, so I DO NOT want to use a different view for landscape orientation. What if they set something in the portrait and rotate to a horizontal position? They will lose their data. So my question is: how do I move something that was previously installed? See the code below, I do not want to reuse the button. Thank!
lblDate = [[UILabel alloc] initWithFrame:CGRectMake(x, y, width, height)];
lblDate.text = @"Date:";
lblDate.backgroundColor = [UIColor clearColor];
[contentView addSubview:lblDate];
source
share