The function of how the device know the changement of orientation is
-(void)viewWillLayoutSubviews and
-(void)viewDidLayoutSubviews
But, they are just in the controllers;
If you are talking about the interface orientation you could observe theUIApplicationDidChangeStatusBarOrientationNotification and if you want to be notified when the device orientation changed you can observe UIDeviceOrientationDidChangeNotification