Is there a delegate that will get called when the iPhone enters landscape or portrait mode? I need to change the style and place objects in a different place when the iPhone get’s rotated. Do I have to do this with the accelerometer? Moreover if there exist such a delegate do I have to create the connection in interface builder. I am new to objective-c…
Share
Register to listen for the orientation change notification.
Implement
orientationChanged:method, which will be called when the device change the orientation. you could put code to check the orientation type and called your method.Remove notification in
dealloc.Check the blog post
Reacting to iPhone’s orientation