デバイスの向きをチェックするアプリケーションを作成しています。そのため、次のコードブロックがあります。
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification
object:[UIDevice currentDevice]];
次に、次のメソッドを呼び出します。
- (void) orientationChanged:(NSNotification *)note {
...
}
私がやりたいのは、別のセクションから投稿した最初のコードブロックとは別に、上記のメソッドを呼び出すことです。これは可能ですか?もしそうなら、どのように?