مشخصات کتاب
-
Alasdair Allan
-
2016
-
انگلیسی
-
25632
-
741
-
0
Basic Sensors in iOS
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1. The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Available Sensor Hardware 1
Differences Between iPhone and iPad 2
Device Orientation and the iPad 4
Detecting Hardware Differences 4
Camera Availability 5
Audio Input Availability 5
GPS Availability 6
Magnetometer Availability 6
Setting Required Hardware Capabilities 6
Persistent WiFi 7
Background Modes 7
2. Using the Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
The Hardware 9
Capturing Stills and Video 10
Video Thumbnails 18
Video Thumbnails Using the UIImagePicker 18
Video Thumbnails Using AVFoundation 19
Saving Media to the Photo Album 20
Video Customization 23
3. Using Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Hardware 25
Media Playback 26
Recording and Playing Audio 31
Recording Audio 32
Playing Audio 35
4. Using the Accelerometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
About the Accelerometer 37
Writing an Accelerometer Application 38
Determining Device Orientation 43
Determining Device Orientation Directly Using the Accelerometer 46
Obtaining Notifications when Device Orientation Changes 48
Which Way Is Up? 49
Convenience Methods for Orientation 52
Detecting Shaking 53
5. Using the Magnetometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
About the Magnetometer 57
Writing a Magnetometer Application 59
Determining the Heading in Landscape Mode 62
Measuring a Magnetic Field 68
6. Using Core Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Core Motion 71
Pulling Motion Data 72
Pushing Motion Data 73
Accessing the Gyroscope 75
Measuring Device Motion 79
Comparing Device Motion with the Accelerometer 83
7. Going Further . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
The iPhone SDK 87
Geolocation and Maps 87
Third-Party SDKs 87
Speech Recognition 88
Computer Vision 88
Augmented Reality 88
External Accessories 88
Learn cocos2D Game Development with iOS 5
Learn cocos2D Game Development with iOS 5
نویسنده: Steffen Itterheim, Andreas Löw
زبان: انگلیسی