I am trying to resize objects in a UIView when the device rotates without hard coding the width and height. In this code, how would I get newWidth and newHeight ?
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { child.frame = CGRectMake(10, 10, newWidth - 20, newHeight - 20); }
iphone
respectTheCode
source share