gdavis / FGallery-iPhone

Objective-C based gallery for iPhones
583 stars 144 forks source link

Rotation with FGallery #22

Closed JMattos closed 12 years ago

JMattos commented 12 years ago

Hi thereI was wondering why you chose to override rotation in the FGalleryViewController. The comment is

/**

Just curious.

gdavis commented 12 years ago

The intent is to allow the FGallery to rotate to all interface orientations no matter what the parent view controller has set for its own allowed orientations. This is particularly useful when pushing the FGallery into a UINavigationController stack where a view controller in the hierarchy does not allow a particular rotation. When this happens, FGallery would not be able to rotate when viewed. By overriding these methods at the UINavigationController and UITabBarController levels, we are allowed a "first-check" (i.e. the first view controller to respond) which allows us to return YES for all orientations when an FGallery is visible. This keeps FGallery rotating at all orientations no matter what.