■ CONTENTS
xviii
Gyroscope and Attitude Results ..........................................................................................................649
Accelerometer Results .......................................................................................................................649
Detecting Shakes ......................................................................................................... 650
Baked-In Shaking ...............................................................................................................................651
The Shake and Break Application .......................................................................................................651
Accelerometer As a Directional Controller ..........................................................................................655
The Ball Application ............................................................................................................................656
Calculating Ball Movement .................................................................................................................660
Summary ...................................................................................................................... 662
■Chapter 21: Using the Camera and Accessing Photos ....................................... 663
Using the Image Picker and UIImagePickerController .................................................. 664
Using the Image Picker Controller ......................................................................................................664
Implementing the Image Picker Controller Delegate ..........................................................................666
Creating the Camera Interface ..................................................................................... 668
Privacy Options ...................................................................................................................................670
Implementing the Camera View Controller .........................................................................................671
Summary ...................................................................................................................... 675
■Chapter 22: Translating Apps Using Localization .............................................. 677
Localization Architecture .............................................................................................. 678
Strings Files ................................................................................................................. 679
The Strings File ...................................................................................................................................679
The Localized String Function ............................................................................................................680
Creating the LocalizeMe App ........................................................................................ 680
Localizing the Project .........................................................................................................................685
Localizing the Storyboard ...................................................................................................................688
Generating and Localizing a Strings File ............................................................................................694
Localizing the App Display Name .......................................................................................................699
Adding Another Localization ...............................................................................................................700
Summary ...................................................................................................................... 701
Book Summary ............................................................................................................. 701