Reputation: 2169
I would my view controller to post a notification used NSNotificationCenter if the orientation is landscape. I'm currently doing this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"change" object:self];
}
}
I don't seem to get a response in my other file. What am I doing wrong?
Upvotes: 0
Views: 246
Reputation: 24476
You're returning YES before you send your notification. It never gets called.
Upvotes: 1