Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
RubyMotion iOS Development Essentials

You're reading from  RubyMotion iOS Development Essentials

Product type Book
Published in Jul 2013
Publisher Packt
ISBN-13 9781849695220
Pages 262 pages
Edition 1st Edition
Languages

Table of Contents (19) Chapters

RubyMotion iOS Development Essentials
Credits
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Getting Ready for RubyMotion 2. Instant Gratification – Your First Application 3. Evolution – From Objective-C to RubyMotion 4. Mastering MVC Paradigm 5. User Interface – Cosmetics for Your App 6. Device Capability – Power Unleashed 7. Interface Builder and WebView – More Goodies! 8. Testing – Let's Fail Gracefully 9. Creating a Game 10. Getting Ready for the App Store 11. Extending RubyMotion Index

Address Book – manage your contacts


Address Book for iOS provides a way to store the contact information and other personal information of people in a centralized database that can then be shared between various applications. In this section, we will perform basic operations related to the Address Book.

We will perform the following operations in this section:

  • Access the device's Address Book

  • Choose a desired user

  • Copy data from the Address Book into our application

Perform the following steps to work with an Address Book:

  1. Let's first create a sample address book application with our favorite motion command:

    $motion create AddressBook_example
    
  2. Next, let's create a controller named addressbook_controller.rb and replace the following code in app_delegate.rb so that our delegate points to our address book controller:

    class AppDelegate
      def application(application, didFinishLaunchingWithOptions:launchOptions)
    
      @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
      @window.rootViewController...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}