views:

44

answers:

1

I am coding against iOS 3.0 and I am trying to add rotation (landscape) support to my app.

Everything about the rotation was easy enough. However, after rotation to landscape mode from portrait, the right-third of the screen (480-320) is unresponsive to all events (touches, drag, etc.). I've verified that the key window is receiving the events but those events are not being passed to the buttons and UIViews on the right (in landscape) side of the screen.

I am using NSNotificationCenter to receive orientation changed events (and not using autorotate flag).

I did see: link text but that wasn't very helpful to my case.

Stuck. Need help. Thanks.

A: 

I've fixed the problem I was having .. I basically needed to do [self.navigationController.view setNeedsLayout].

The way I understand this (which maybe incorrect is that self.navigationController.view.frame was same as self.view.frame and both were equal to (x=0,y=0,width=320,height=480). I then rotated self.view by M_PI/2 and did a number of frame manipulation on select self.view.subviews to get everything to animate/position/scale correctly.

That worked out okay but the navigation controller was not willing to acknowledge touch events to parts of self.view there were to the right of 320. In essence, if this self.navigationController.view.clipsToBounds were true, it might not even have shown that part of self.view.

Anyway, setting setNeedsLayout on the navigation controller's view resolved the issue. I hope this helps someone else.

Ephraim