Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

polezero

macrumors newbie
Original poster
Feb 6, 2011
2
0
Hi,

I am working on an iPad reader app that can handle rotations of the device.

I put a custom controller in a NIB file. In the awakeFromNib of the controller class, I set some frames for a UIScrollView. Everything displays correctly.

At the end of awakeFromNib, I add an observer to handle rotations as

Code:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didRotate:)												 name:UIDeviceOrientationDidChangeNotification
object:nil];

But this time, the UIScrollView does not load when the application launches. It loads only after the first rotation.

The only thing that's different in these two cases is the code piece above.

Any thoughts?

Many thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.