How can I rotate my base view and still make sure that its subviews are still in their correct locations?
--------
|X | After 90 degree rotate and stretch
| | this should remain the same
| |
| Y|
--------
I presume I need to rotate 90 degrees and stretch according to window ratio and perform the opposite on the subview?
The following does not work...
- (void) performTransformation:(UIView*)view isBase:(BOOL)isBase
{
if(isBase) {
[view.layer setAffineTransform:CGAffineTransformConcat(
CGAffineTransformMakeRotation(M_PI * 0.5),
CGAffineTransformMakeScale(-(3.0/4.0), (4.0/3.0)))];
} else {
[view.layer setAffineTransform:CGAffineTransformConcat(
CGAffineTransformMakeScale(-(4.0/3.0), (3.0/4.0)),
CGAffineTransformMakeRotation(-M_PI * 0.5))];
}