Rotation Notification

There will be times when you want to do something special in a view controller when the device orientation changes. In Homepwner, one issue is that on an iPhone, the UIImageView on the BNRDetailViewController becomes too small in landscape orientation. It would make more sense to limit the user to taking and viewing the picture in portrait orientation. To make this happen, you need to hide the image view and disable the camera button when the application is in landscape orientation.

First, you need a pointer to the camera button so that you can send it a message to disable it. Navigate to BNRDetailViewController.m. Then, Option-Click on BNRDetailViewController.xib to open it in the assistant editor.

Now, ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.