iOS 5 Programming Cookbook. Solutions & Examples for iPhone, iPad, and iPod touch Apps - Helion
ISBN: 978-14-493-2113-0
stron: 876, Format: ebook
Data wydania: 2012-01-30
Księgarnia: Helion
Cena książki: 152,15 zł (poprzednio: 176,92 zł)
Oszczędzasz: 14% (-24,77 zł)
Now you can overcome the vexing, real-life issues you confront when creating apps for the iPhone, iPad, or iPod Touch. By making use of more than 100 new recipes in this updated cookbook, you’ll quickly learn the steps necessary for writing complete iOS apps, whether they’re as simple as a music player or feature a complex mix of animations, graphics, multimedia, a database, and iCloud storage.
If you’re comfortable with iOS SDK, this cookbook will teach you how to use hundreds of iOS techniques. Each recipe provides a clear solution with sample code that you can use right away.
- Use different approaches to construct a user interface
- Develop location-aware apps
- Get working examples for implementing gesture recognizers
- Play audio and video files and access the iPod library
- Retrieve contacts and groups from the Address Book
- Determine camera availability and access the Photo Library
- Create multitasking-aware apps
- Maintain persistent storage in your apps
- Use Event Kit to manage calendars and events
- Learn capabilities of the Core Graphics framework
- Access the accelerometer and gyroscope
- Take advantage of the iCloud service
Osoby które kupowały "iOS 5 Programming Cookbook. Solutions & Examples for iPhone, iPad, and iPod touch Apps", wybierały także:
- Zen Steve'a Jobsa 29,67 zł, (8,90 zł -70%)
- Programowanie aplikacji mobilnych dla iOS z wykorzystaniem Xcode, Swift 3.0 i iOS 10 SDK. Kurs video. Poziom pierwszy 99,00 zł, (44,55 zł -55%)
- Flutter i Dart 2 dla początkujących. Przewodnik dla twórców aplikacji mobilnych 89,00 zł, (44,50 zł -50%)
- Dostosuj się lub giń. Jak odnieść sukces w branży aplikacji mobilnych 44,90 zł, (22,45 zł -50%)
- Podstawy języka Swift. Programowanie aplikacji dla platformy iOS 49,00 zł, (24,50 zł -50%)
Spis treści
iOS 5 Programming Cookbook. Solutions & Examples for iPhone, iPad, and iPod touch Apps eBook -- spis treści
- iOS 5 Programming Cookbook
- SPECIAL OFFER: Upgrade this ebook with OReilly
- A Note Regarding Supplemental Files
- Preface
- Audience
- Organization of This Book
- Additional Resources
- Conventions Used in This Book
- Using Code Examples
- Wed Like to Hear from You
- Safari Books Online
- Acknowledgments
- 1. The Basics
- 1.0. Introduction
- 1.1. Creating a Simple iOS App in Xcode
- Problem
- Solution
- Discussion
- 1.2. Understanding Interface Builder
- Problem
- Solution
- Discussion
- See Also
- 1.3. Compiling iOS Apps
- Problem
- Solution
- Discussion
- See Also
- 1.4. Running iOS Apps on the Simulator
- Problem
- Solution
- Discussion
- See Also
- 1.5. Running iOS Apps on iOS Devices
- Problem
- Solution
- Discussion
- See Also
- 1.6. Packaging iOS Apps for Distribution
- Problem
- Solution
- Discussion
- 1.7. Declaring Variables in Objective-C
- Problem
- Solution
- Discussion
- 1.8. Allocating and Making Use of Strings
- Problem
- Solution
- Discussion
- 1.9. Comparing Values in Objective-C with an If Statement
- Problem
- Solution
- Discussion
- See Also
- 1.10. Implementing Loops with For Statements
- Problem
- Solution
- Discussion
- 1.11. Implementing While Loops
- Problem
- Solution
- Discussion
- See Also
- 1.12. Creating Custom Classes
- Problem
- Solution
- Discussion
- 1.13. Defining Functionality for Classes
- Problem
- Solution
- Discussion
- 1.14. Defining Two or More Methods with the Same Name
- Problem
- Solution
- Discussion
- See Also
- 1.15. Allocating and Initializing Objects
- Problem
- Solution
- Discussion
- 1.16. Adding Properties to Classes
- Problem
- Solution
- Discussion
- See Also
- 1.17. Moving From Manual Reference Counting to Automatic Reference Counting
- Problem
- Solution
- Discussion
- 1.18. Typecasting with Automatic Reference Counting
- Problem
- Solution
- Discussion
- See Also
- 1.19. Delegating Tasks with Protocols
- Problem
- Solution
- Discussion
- 1.20. Determining Whether Instance or Class Methods Are Available
- Problem
- Solution
- Discussion
- See Also
- 1.21. Determining Whether a Class Is Available at Runtime
- Problem
- Solution
- Discussion
- 1.22. Allocating and Making Use of Numbers
- Problem
- Solution
- Discussion
- 1.23. Allocating and Making Use of Arrays
- Problem
- Solution
- Discussion
- 1.24. Allocating and Making Use of Dictionaries
- Problem
- Solution
- Discussion
- 1.25. Allocating and Making Use of Sets
- Problem
- Solution
- Discussion
- 1.26. Creating Bundles
- Problem
- Solution
- Discussion
- 1.27. Loading Data From the Main Bundle
- Problem
- Solution
- Discussion
- See Also
- 1.28. Loading Data From Other Bundles
- Problem
- Solution
- Discussion
- See Also
- 1.29. Sending Notifications with NSNotificationCenter
- Problem
- Solution
- Discussion
- 1.30. Listening for Notifications Sent From NSNotificationCenter
- Problem
- Solution
- Discussion
- See Also
- 2. Implementing Controllers and Views
- 2.0. Introduction
- 2.1. Displaying Alerts with UIAlertView
- Problem
- Solution
- Discussion
- See Also
- 2.2. Creating and Using Switches with UISwitch
- Problem
- Solution
- Discussion
- 2.3. Picking Values with UIPickerView
- Problem
- Solution
- Discussion
- See Also
- 2.4. Picking the Date and Time with UIDatePicker
- Problem
- Solution
- Discussion
- 2.5. Implementing Range Pickers with UISlider
- Problem
- Solution
- Discussion
- 2.6. Grouping Compact Options with UISegmentedControl
- Problem
- Solution
- Discussion
- 2.7. Presenting and Managing Views with UIViewController
- Problem
- Solution
- Discussion
- See Also
- 2.8. Implementing Navigation with UINavigationController
- Problem
- Solution
- Discussion
- See Also
- 2.9. Manipulating a Navigation Controllers Array of View Controllers
- Problem
- Solution
- Discussion
- 2.10. Displaying an Image on a Navigation Bar
- Problem
- Solution
- Discussion
- 2.11. Adding Buttons to Navigation Bars Using UIBarButtonItem
- Problem
- Solution
- Discussion
- See Also
- 2.12. Presenting Multiple View Controllers with UITabBarController
- Problem
- Solution
- Discussion
- 2.13. Displaying Static Text with UILabel
- Problem
- Solution
- Discussion
- 2.14. Accepting User Text Input with UITextField
- Problem
- Solution
- Discussion
- See Also
- 2.15. Displaying Long Lines of Text with UITextView
- Problem
- Solution
- Discussion
- 2.16. Adding Buttons to the User Interface with UIButton
- Problem
- Solution
- Discussion
- 2.17. Displaying Images with UIImageView
- Problem
- Solution
- Discussion
- 2.18. Creating Scrollable Content with UIScrollView
- Problem
- Solution
- Discussion
- 2.19. Loading Web Pages with UIWebView
- Problem
- Solution
- Discussion
- 2.20. Presenting Master-Detail Views with UISplitViewController
- Problem
- Solution
- Discussion
- 2.21. Enabling Paging with UIPageViewController
- Problem
- Solution
- Discussion
- 2.22. Displaying Popovers with UIPopoverController
- Problem
- Solution
- Discussion
- See Also
- 2.23. Displaying Progress with UIProgressView
- Problem
- Solution
- Discussion
- 2.24. Listening and Reacting to Keyboard Notifications
- Problem
- Solution
- Discussion
- See Also
- 3. Constructing and Using Table Views
- 3.0. Introduction
- 3.1. Instantiating a Table View
- Problem
- Solution
- Discussion
- 3.2. Assigning a Delegate to a Table View
- Problem
- Solution
- Discussion
- 3.3. Populating a Table View with Data
- Problem
- Solution
- Discussion
- 3.4. Receiving and Handling Table View Events
- Problem
- Solution
- Discussion
- See Also
- 3.5. Using Different Types of Accessories in a Table View Cell
- Problem
- Solution
- Discussion
- 3.6. Creating Custom Table View Cell Accessories
- Problem
- Solution
- Discussion
- 3.7. Displaying Hierarchical Data in Table Views
- Problem
- Solution
- Discussion
- 3.8. Enabling Swipe Deletion of Table View Cells
- Problem
- Solution
- Discussion
- 3.9. Constructing Headers and Footers in Table Views
- Problem
- Solution
- Discussion
- 3.10. Displaying Context Menus on Table Views Cells
- Problem
- Solution
- Discussion
- 3.11. Moving Cells and Sections in Table Views
- Problem
- Solution
- Discussion
- 3.12. Deleting Cells and Sections From Table Views
- Problem
- Solution
- Discussion
- See Also
- 4. Storyboards
- 4.0. Introduction
- 4.1. Creating a Project with Storyboards
- Problem
- Solution
- Discussion
- 4.2. Adding a Navigation Controller to a Storyboard
- Problem
- Solution
- Discussion
- See Also
- 4.3. Passing Data From One Screen to Another
- Problem
- Solution
- Discussion
- See Also
- 4.4. Adding a Storyboard to an Existing Project
- Problem
- Solution
- Discussion
- 5. Concurrency
- 5.0. Introduction
- 5.1. Constructing Block Objects
- Problem
- Solution
- Discussion
- 5.2. Accessing Variables in Block Objects
- Problem
- Solution
- Discussion
- 5.3. Invoking Block Objects
- Problem
- Solution
- Discussion
- See Also
- 5.4. Dispatching Tasks to Grand Central Dispatch
- Problem
- Solution
- Discussion
- See Also
- 5.5. Performing UI-Related Tasks with GCD
- Problem
- Solution
- Discussion
- 5.6. Performing Non-UI Related Tasks Synchronously with GCD
- Problem
- Solution
- Discussion
- See Also
- 5.7. Performing Non-UI Related Tasks Asynchronously with GCD
- Problem
- Solution
- Discussion
- See Also
- 5.8. Performing Tasks After a Delay with GCD
- Problem
- Solution
- Discussion
- See Also
- 5.9. Performing a Task Only Once with GCD
- Problem
- Solution
- Discussion
- 5.10. Grouping Tasks Together with GCD
- Problem
- Solution
- Discussion
- See Also
- 5.11. Constructing Your Own Dispatch Queues with GCD
- Problem
- Solution
- Discussion
- 5.12. Running Tasks Synchronously with Operations
- Problem
- Solution
- Discussion
- See Also
- 5.13. Running Tasks Asynchronously with Operations
- Problem
- Solution
- Discussion
- See Also
- 5.14. Creating Dependency Between Operations
- Problem
- Solution
- Discussion
- See Also
- 5.15. Creating Timers
- Problem
- Solution
- Discussion
- 5.16. Creating Concurrency with Threads
- Problem
- Solution
- Discussion
- 5.17. Invoking Background Methods
- Problem
- Solution
- Discussion
- 5.18. Exiting Threads and Timers
- Problem
- Solution
- Discussion
- 6. Core Location and Maps
- 6.0. Introduction
- 6.1. Creating a Map View
- Problem
- Solution
- Discussion
- 6.2. Handling the Events of a Map View
- Problem
- Solution
- Discussion
- See Also
- 6.3. Pinpointing the Location of a Device
- Problem
- Solution
- Discussion
- 6.4. Displaying Pins on a Map View
- Problem
- Solution
- Discussion
- 6.5. Displaying Pins with Different Colors on a Map View
- Problem
- Solution
- Discussion
- 6.6. Displaying Custom Pins on a Map View
- Problem
- Solution
- Discussion
- See Also
- 6.7. Converting Meaningful Addresses to Longitude and Latitude
- Problem
- Solution
- Discussion
- 6.8. Converting Longitude and Latitude to a Meaningful Address
- Problem
- Solution
- Discussion
- 7. Implementing Gesture Recognizers
- 7.0. Introduction
- 7.1. Detecting Swipe Gestures
- Problem
- Solution
- Discussion
- 7.2. Detecting Rotation Gestures
- Problem
- Solution
- Discussion
- See Also
- 7.3. Detecting Panning and Dragging Gestures
- Problem
- Solution
- Discussion
- 7.4. Detecting Long Press Gestures
- Problem
- Solution
- Discussion
- 7.5. Detecting Tap Gestures
- Problem
- Solution
- Discussion
- 7.6. Detecting Pinch Gestures
- Problem
- Solution
- Discussion
- 8. Networking, JSON, XML, and Twitter
- 8.0. Introduction
- 8.1. Downloading Asynchronously with NSURLConnection
- Problem
- Solution
- Discussion
- 8.2. Handling Timeouts in Asynchronous Connections
- Problem
- Solution
- Discussion
- 8.3. Downloading Synchronously with NSURLConnection
- Problem
- Solution
- Discussion
- 8.4. Modifying a URL Request with NSMutableURLRequest
- Problem
- Solution
- Discussion
- 8.5. Sending HTTP GET Requests with NSURLConnection
- Problem
- Solution
- Discussion
- 8.6. Sending HTTP POST Requests with NSURLConnection
- Problem
- Solution
- Discussion
- 8.7. Sending HTTP DELETE Requests with NSURLConnection
- Problem
- Solution
- Discussion
- 8.8. Sending HTTP PUT Requests with NSURLConnection
- Problem
- Solution
- Discussion
- 8.9. Serializing Arrays and Dictionaries into JSON
- Problem
- Solution
- Discussion
- 8.10. Deserializing JSON into Arrays and Dictionaries
- Problem
- Solution
- Discussion
- See Also
- 8.11. Integrating Twitter Functionality into Your Apps
- Problem
- Solution
- Discussion
- 8.12. Parsing XML with NSXMLParser
- Problem
- Solution
- Discussion
- 9. Audio and Video
- 9.0. Introduction
- 9.1. Playing Audio Files
- Problem
- Solution
- Discussion
- See Also
- 9.2. Handling Interruptions While Playing Audio
- Problem
- Solution
- Discussion
- 9.3. Recording Audio
- Problem
- Solution
- Discussion
- See Also
- 9.4. Handling Interruptions While Recording Audio
- Problem
- Solution
- Discussion
- 9.5. Playing Audio Over Other Active Sounds
- Problem
- Solution
- Discussion
- 9.6. Playing Video Files
- Problem
- Solution
- Discussion
- See Also
- 9.7. Capturing Thumbnails From a Video File
- Problem
- Solution
- Discussion
- 9.8. Accessing the Music Library
- Problem
- Solution
- Discussion
- 10. Address Book
- 10.0. Introduction
- 10.1. Retrieving a Reference to an Address Book
- Problem
- Solution
- Discussion
- 10.2. Retrieving All the People in the Address Book
- Problem
- Solution
- Discussion
- See Also
- 10.3. Retrieving Properties of Address Book Entries
- Problem
- Solution
- Discussion
- See Also
- 10.4. Inserting a Person Entry into the Address Book
- Problem
- Solution
- Discussion
- 10.5. Inserting a Group Entry into the Address Book
- Problem
- Solution
- Discussion
- 10.6. Adding Persons to Groups
- Problem
- Solution
- Discussion
- See Also
- 10.7. Searching the Address Book
- Problem
- Solution
- Discussion
- 10.8. Retrieving and Setting a Persons Address Book Image
- Problem
- Solution
- Discussion
- 11. Camera and the Photo Library
- 11.0. Introduction
- 11.1. Detecting and Probing the Camera
- Problem
- Solution
- Discussion
- 11.2. Taking Photos with the Camera
- Problem
- Solution
- Discussion
- See Also
- 11.3. Taking Videos with the Camera
- Problem
- Solution
- Discussion
- See Also
- 11.4. Storing Photos in the Photo Library
- Problem
- Solution
- Discussion
- 11.5. Storing Videos in the Photo Library
- Problem
- Solution
- Discussion
- 11.6. Retrieving Photos and Videos From the Photo Library
- Problem
- Solution
- Discussion
- See Also
- 11.7. Retrieving Assets From the Assets Library
- Problem
- Solution
- Discussion
- 11.8. Editing Videos on an iOS Device
- Problem
- Solution
- Discussion
- See Also
- 12. Multitasking
- 12.0. Introduction
- 12.1. Detecting the Availability of Multitasking
- Problem
- Solution
- Discussion
- 12.2. Completing a Long-Running Task in the Background
- Problem
- Solution
- Discussion
- See Also
- 12.3. Receiving Local Notifications in the Background
- Problem
- Solution
- Discussion
- 12.4. Playing Audio in the Background
- Problem
- Solution
- Discussion
- 12.5. Handling Location Changes in the Background
- Problem
- Solution
- Discussion
- 12.6. Saving and Loading the State of Multitasking iOS Apps
- Problem
- Solution
- Discussion
- See Also
- 12.7. Handling Network Connections in the Background
- Problem
- Solution
- Discussion
- See Also
- 12.8. Handling Notifications Delivered to a Waking App
- Problem
- Solution
- Discussion
- 12.9. Responding to Changes in App Settings
- Problem
- Solution
- Discussion
- 12.10. Opting Out of Multitasking
- Problem
- Solution
- Discussion
- 13. Core Data
- 13.0. Introduction
- 13.1. Creating a Core Data Model with Xcode
- Problem
- Solution
- Discussion
- 13.2. Generating Class Files for Core Data Entities
- Problem
- Solution
- Discussion
- 13.3. Creating and Saving Data Using Core Data
- Problem
- Solution
- Discussion
- 13.4. Reading Data From Core Data
- Problem
- Solution
- Discussion
- See Also
- 13.5. Deleting Data From Core Data
- Problem
- Solution
- Discussion
- 13.6. Sorting Data in Core Data
- Problem
- Solution
- Discussion
- See Also
- 13.7. Boosting Data Access in Table Views
- Problem
- Solution
- Discussion
- 13.8. Implementing Relationships in Core Data
- Problem
- Solution
- Discussion
- 14. Dates, Calendars, and Events
- 14.0. Introduction
- 14.1. Retrieving the List of Calendars
- Problem
- Solution
- Discussion
- See Also
- 14.2. Adding Events to Calendars
- Problem
- Solution
- Discussion
- See Also
- 14.3. Accessing the Contents of Calendars
- Problem
- Solution
- Discussion
- See Also
- 14.4. Removing Events From Calendars
- Problem
- Solution
- Discussion
- See Also
- 14.5. Adding Recurring Events to Calendars
- Problem
- Solution
- Discussion
- See Also
- 14.6. Retrieving the Attendees of an Event
- Problem
- Solution
- Discussion
- See Also
- 14.7. Adding Alarms to Calendars
- Problem
- Solution
- Discussion
- See Also
- 14.8. Handling Event Changed Notifications
- Problem
- Solution
- Discussion
- 14.9. Presenting Event View Controllers
- Problem
- Solution
- Discussion
- See Also
- 14.10. Presenting Event Edit View Controllers
- Problem
- Solution
- Discussion
- See Also
- 15. Graphics and Animations
- 15.0. Introduction
- 15.1. Enumerating and Loading Fonts
- Problem
- Solution
- Discussion
- See Also
- 15.2. Drawing Text
- Problem
- Solution
- Discussion
- 15.3. Constructing, Setting, and Using Colors
- Problem
- Solution
- Discussion
- See Also
- 15.4. Drawing Images
- Problem
- Solution
- Discussion
- See Also
- 15.5. Drawing Lines
- Problem
- Solution
- Discussion
- See Also
- 15.6. Constructing Paths
- Problem
- Solution
- Discussion
- See Also
- 15.7. Drawing Rectangles
- Problem
- Solution
- Discussion
- See Also
- 15.8. Adding Shadows to Shapes
- Problem
- Solution
- Discussion
- 15.9. Drawing Gradients
- Problem
- Solution
- Discussion
- See Also
- 15.10. Displacing Shapes Drawn on Graphic Contexts
- Problem
- Solution
- Discussion
- See Also
- 15.11. Scaling Shapes Drawn on Graphic Contexts
- Problem
- Solution
- Discussion
- See Also
- 15.12. Rotating Shapes Drawn on Graphic Contexts
- Problem
- Solution
- Discussion
- See Also
- 15.13. Animating and Moving Views
- Problem
- Solution
- Discussion
- 15.14. Animating and Scaling Views
- Problem
- Solution
- Discussion
- See Also
- 15.15. Animating and Rotating Views
- Problem
- Solution
- Discussion
- See Also
- 16. Core Motion
- 16.0. Introduction
- 16.1. Detecting the Availability of an Accelerometer
- Problem
- Solution
- Discussion
- See Also
- 16.2. Detecting the Availability of a Gyroscope
- Problem
- Solution
- Discussion
- See Also
- 16.3. Retrieving Accelerometer Data
- Problem
- Solution
- Discussion
- See Also
- 16.4. Detecting Shakes on an iOS Device
- Problem
- Solution
- Discussion
- 16.5. Retrieving Gyroscope Data
- Problem
- Solution
- Discussion
- See Also
- 17. iCloud
- 17.0. Introduction
- 17.1. Setting Up Your App for iCloud
- Problem
- Solution
- Discussion
- 17.2. Storing and Synchronizing Dictionaries in iCloud
- Problem
- Solution
- Discussion
- 17.3. Creating and Managing Folders for Apps in iCloud
- Problem
- Solution
- Discussion
- See Also
- 17.4. Searching for Files and Folders in iCloud
- Problem
- Solution
- Discussion
- See Also
- 17.5. Storing User Documents in iCloud
- Problem
- Solution
- Discussion
- See Also
- 17.6. Managing the State of Documents in iCloud
- Problem
- Solution
- Discussion
- See Also
- 17.7. Handling Conflicts in iCloud Documents
- Problem
- Solution
- Discussion
- See Also
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with OReilly