I need to send the notification @"willAnimateRotationToInterfaceOrientation" with the parameters toInterfaceOrientation and duration (question #1) to all UIViewController on the application (question #2). How to write code for that?
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(willAnimateRotationToInterfaceOrientation:toInterfaceOrientation:duration)
name:@"willAnimateRotationToInterfaceOrientation"
object:nil];
[[NSNotificationCenter defaultCenter]
postNotificationName:@"willAnimateRotationToInterfaceOrientation"
object:self];