I am working on an app where I have just assign the transformation to image view when device rotated in landscape mode. Now I want exact frame of that image view after transformation applied to it. I have tried with this example: Find Frame Coordinates After UIView Transform is Applied (CGAffineTransform) but not succeeded. Code I have used:
UIView *Newview = [[UIView alloc] initWithFrame:_FullImageView.frame];
_FullImageView.transform=CGAffineTransformMakeRotation(-M_PI_2);
_FullImageView.frame = CGRectMake(Newview.frame.origin.x, Newview.frame.origin.y,Newview.frame.size.width,Newview.frame.size.height);
_FullImageView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
If anybody have any suggestion then please let me know. It would be very appreciated. Thanks.
Please check the following code. Hope you need the same.
UIView*Newview = [[UIView alloc] initWithFrame:_FullImageView.frame];
_FullImageView.transform=CGAffineTransformMakeRotation(-M_PI_2);
CGRect rect = _FullImageView.frame;
Check rect frame , it gives you the frame after transform.