Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

SUMMARY

This chapter explained how changes in screen orientation are handled by the various methods in the View Controller class. Proper handling of screen orientations will make your application more useable and improve the user experience.

EXERCISES

  1. Suppose you want your application to support only the landscape right and landscape left orientations. How should you modify your code?
  2. What is the difference between the frame and center property of a view?

Answers to the exercises can be found in Appendix D.

image WHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Handling device rotations Implement the willRotateToInterfaceOrientation: and willAnimateRotationToInterfaceOrientation: methods.
Four orientations supported UIInterfaceOrientationPortraitUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRightUIInterfaceOrientationPortraitUpsideDown
Events fired when device is rotated willAnimateFirstHalfOfRotationToInterfaceOrientation:
Properties for changing the position of a view Use the frame property for changing the positioning and size of a view.

Use the center property for changing the positioning of a view.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book