- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
NSLog(@"will rotation");
for (UIButton *button in self.view.subviews) {
[button removeFromSuperview];
}
}
このコードに問題があります。ビューからUIButtonのみを削除する必要があります。しかし、このコードは私のself.viewのすべてのサブビューも削除します。どうすればこれを解決できますか?