frame UIView - , . PI/2, sqrt (2), , , .
, , ,
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
CGFloat w = self.closeButton.bounds.size.width / sqrtf( 2.0f );
CGFloat h = self.closeButton.bounds.size.height / sqrtf( 2.0f );
NSLog( @"%@ w=%f", NSStringFromCGRect( self.closeButton.bounds ), w );
[UIView animateWithDuration:.5 animations:^{
self.closeButton.transform = CGAffineTransformMakeRotation(M_PI/4);
self.closeButton.bounds = CGRectMake( 0, 0, w, h );
}];
NSLog( @"%@", NSStringFromCGRect( self.closeButton.frame ) );
}