/** * 当一个控件被添加到父控件中就会调用 */ - (void)didMoveToSuperview { if (self.group.opened) { self.nameView.imageView.transform = CGAffineTransformMakeRotation(M_PI_2); } else { self.nameView.imageView.transform = CGAffineTransformMakeRotation(0); } }
/** * 当一个控件即将被添加到父控件中会调用 */ //- (void)willMoveToSuperview:(UIView *)newSuperview //{ // //}