Sams Teach Yourself Objective-C in 24 Hours
Home > Computing and Information Technology > Computer programming / software engineering > Macintosh programming > Sams Teach Yourself Objective-C in 24 Hours
Sams Teach Yourself Objective-C in 24 Hours

Sams Teach Yourself Objective-C in 24 Hours


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Full-color figures and code appear as they do in Xcode 5. In just 24 sessions of one hour or less, you can master the Objective-C language and start using it to write powerful native applications for even the newest Macs and iOS devices! Using this book’s straightforward, step-by-step approach, you’ll get comfortable with Objective-C’s unique capabilities and Apple’s Xcode 5 development environment…make the most of Objective-C objects and messaging…work effectively with design patterns, collections, blocks, Foundation Classes, threading, Git…and a whole lot more. Every lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success! Step-by-Step Instructions carefully walk you through the most common Objective-C development tasks. Quizzes and Exercises at the end of each chapter help you test your knowledge. Notes present information related to the discussion. Tips offer advice or show you easier ways to perform tasks. Cautions alert you to possible problems and give you advice on how to avoid them. • Use Xcode 5 to write modern Objective-C software more quickly and efficiently • Master Objective-C’s object-oriented features and techniques • Manage projects more efficiently with the Git source code repository • Write more dynamic code with Objective-C’s powerful messaging architecture • Declare classes, instance variables, properties, methods, and actions • Work with mutable and immutable data types • Organize data with collections, including arrays, dictionaries, and sets • Painlessly manage memory with Automatic Reference Counting (ARC) • Expand and extend classes with protocols, delegates, categories, and extensions • Get started with Apple’s powerful classes and frameworks • Create and work with code blocks • Manage queues and threading with Grand Central Dispatch

Table of Contents:
Introduction   1 Who Should Read This Book   1 What This Book Covers   1 Downloading the Sample Files   2 How This Book Is Organized   2 PART I:  GETTING STARTED WITH OBJECTIVE-C HOUR 1:  Overview of the Developer Program   7 Introducing Objective-C   7 Enrolling as an Apple Developer   8 Choosing Your Program   8    Selecting Your Membership Category   9    Registering for Your Apple ID   10 Setting Up the Development Environment   11    Talking Xcode   11    Introducing the Xcode Workspace   12    Getting Up and Running with Your First Project   16 Summary   17 Q&A   18 Workshop   18    Quiz   18    Quiz Answers   18    Activities   19 HOUR 2:  Object-Oriented Programming with Objective-C   21 Object-Oriented Programming in the Objective-C World   21    Implementing Object-Oriented Programming   21    Building Object-Oriented Projects   22    Looking at the Frameworks   23 Creating C with Objects   24    Start Thinking in Objective-C   24    Understanding Data Abstraction   24    Considering Classes and Instances    25    Exploring Encapsulation   25    Using Accessors to Manage Encapsulation   28 Managing Inheritance in the Objective-C World   29 Summary   30 Q&A   31 Workshop   31    Quiz   31    Quiz Answers   31    Activities   31 HOUR 3:  Using Object-Oriented Features in Objective-C   33 Communicating to Methods with Messages   33    Looking at a Simple Message   33    Declaring a Method   34    Using Class Methods   35    Working with id—Strongly and Weakly Typed Variables   35    Nesting Messages   36    Looking at Method Signatures and Parameters   36 Allocating and Initializing Objects   37 Summary   39 Q&A   39 Workshop   39    Quiz   39    Quiz Answers   39    Activities   39 HOUR 4:  Using Xcode 5   41 Getting to Work with Xcode   41 Keeping Track of Your Source Code   46    Exploring Source Code Control   47    Working in a Source Code Repository World   48    Using Git with Xcode   50 Using a Remote Repository   58 Summary   61 Q&A   61 Workshop   61    Quiz   61    Quiz Answers   61    Activities   62 HOUR 5:  Using Compiler Directives   63 Exploring Your Projects   63    Looking at the iOS Project   64    Looking at the OS X Project   64    Looking at Both Projects   65 Working with Compiler Directives   66    Working with Basic Directives   66    Looking at Prefix Headers    67    Looking at Plain C Code in main.m   69    Investigating Header (.h) Files   70    Looking Inside Message (.m) Files   71 Using Objective-C Compiler Directives   74 Summary   74 Q&A   74 Workshop   75    Quiz   75    Quiz Answers   75    Activities   75 PART II:  WORKING WITH THE OBJECTIVE-C BASICS HOUR 6:  Exploring Messaging and a Testbed App   77 Setting Up the Testbed Apps   77 Adding a Text Field and Connecting It to Your Code   81    Adding the Text Field   82    Connecting the Text Field to the Code   88 Sending a Message to the Text Field   92 Reviewing the Message Syntax   94 Summary   95 Q&A   95 Workshop   96    Quiz   96    Quiz Answers   96    Activities   96 HOUR 7:  Declaring a Class in an Interface File   97 Letting Xcode Do the Work   97    Designing Classes   97    Getting Ready to Create the Class   98 Exploring Class Hierarchies   104    Calling Superclass Methods   104    Introducing Protocols   106 Declaring Classes   106    Writing a Basic Class Declaration   106    Using Forward References   107 Summary   109 Q&A   109 Workshop   109    Quiz   109    Quiz Answers   109    Activities   109 HOUR 8:  Declaring Instance Variables in an Interface File   111 Declaring Instance Variables and Properties   111 Using the Class   111    Placing a Class Instance in Context   112    Choosing the Context   113 Creating an Instance Variable for CurrencyConverter with id   114 What Happens When Execution Stops   115    Dynamic Binding   117 Creating an Instance Variable for CurrencyConverter with the Class Name   117 Creating an Instance Variable for CurrencyConverter with a Superclass Name   119 Managing Instance Variable Visibility   123 Summary   124 Q&A   124 Workshop   124    Quiz   124    Quiz Answers   124    Activities   125 HOUR 9:  Declaring Properties in an Interface File   127 Comparing Interface Variables and Properties   127    Reviewing Basic Variable Declarations   128    Creating Declared Properties: The Basics   130    Dealing with Memory for Objects   132    Working with Attributes for Declared Properties   133 Using Declared Properties   133    Accessing the Property with Message Syntax   134    Accessing the Property with Dot Syntax   134 Using Attributes   135    Accessor Methods   136    Writability   136    Setter Semantics   137    Atomicity   137    Using Other Attribute Decorators   137 Implementing Properties   138    Creating Accessors with @synthesize   138    Promising Data with @dynamic   139 Summary   139 Q&A   139 Workshop   139    Quiz   139    Quiz Answers   139    Activities   140 HOUR 10:  Declaring Methods in an Interface File   141 Working with Methods in a Class   141 Reviewing Method Syntax   142    Distinguishing Between Class and Instance Methods   142    Exploring the Method Declaration   143    Writing the Method Declaration   146    Returning Complex Data Structures from Methods   146 Summary   147 Q&A   147 Workshop   148    Quiz   148    Quiz Answers   148    Activities   148 HOUR 11:  Declaring Actions in an Interface File   149 Introducing Actions   149    What Actions Can Do for You   150 Comparing Actions in OS X and iOS   159    Disconnecting Actions   161 Summary   162 Q&A   162 Workshop   163    Quiz   163    Quiz Answers   163    Activities   163 HOUR 12:  Routing Messages with Selectors   165 Getting Inside Objective-C Messages 165    Receiver and Selector Objects in Messages   166 Getting Inside the Objective-C Runtime 167 Working with SEL and @selector () 168 Using performSelector    169    Creating a Selector with @selector ()   169    Creating a Selector from a String   169    Using a Selector   170 Using NSInvocation   172    Creating an NSInvocation   172    Using NSInvocation Properties   173    Invoking an NSInvocation   175 Testing Whether an Instance Can Respond to a Selector   175 Summary   176 Q&A   176 Workshop   177    Quiz   177    Quiz Answers   177    Activities   177 HOUR 13:  Building on the Foundation   179 Exploring the Foundation Framework 179 Foundation Classes 180    Root Classes    180    Other Classes   181 Foundation Paradigms and Policies   182    Mutability   182    Class Clusters   183    Notifications   184 Summary   187 Q&A   187 Workshop   187    Quiz   187    Quiz Answers   187    Activities   187 HOUR 14:  Defining a Class in an Implementation File   189 Working with a New Project   189    Reconsidering Dynamic Typing   190    Designing the (Currency) Converter   190 Creating a New App   193 Implementing a Method   197 Expanding the Class with init Methods   200 Summary   202 Q&A   202 Workshop   202    Quiz   202    Quiz Answers   202    Activities   203 HOUR 15:  Organizing Data with Collections   205 Collecting Objects   205 Getting Familiar with Property Lists   207    Using Collections in Property Lists   208    Building Collections from Property Lists at Runtime   209 Comparing the Collection Classes   209 Creating a Collection   210    Using the Common Collection Creation Methods   211 Using Objective-C Literal Syntax   212    Reading and Writing Arrays   213    Reading and Writing Dictionaries   213    Creating Sets   214 Enumerating a Collection   214    Examining NSEnumerator Methods   214    Creating NSEnumerator Instances for Collections   215 Testing Membership in a Collection   217 Accessing an Object in a Collection   218 Summary   218 Q&A   218 Workshop   219    Quiz   219    Quiz Answers   219    Activities   219 HOUR 16:  Managing Memory and Runtime Objects   221 Managing Objects in Memory   221 Managing Reference Counts Manually   222    Looking at Memory Management Before ARC   223    Summarizing Memory Management   225 Managing Reference Counts with ARC   225    Using Declared Property Attributes   226 Variable Qualifiers   227 Autoreleasing Variables   228 Summary   229 Q&A   229 Workshop   229    Quiz   229    Quiz Answers   229    Activities   229 PART III:  EXPANDING AND EXTENDING CLASSES HOUR 17:  Extending a Class with Protocols and Delegates   231 Exploring the Pros and Cons of Subclassing   231 Introducing the Example   232 Working with Protocols   232 Working with Delegates   233 Putting Protocols and Delegates Together   233 Looking Deeper Inside Protocols   236 Summary   236 Q&A   236 Workshop   237    Quiz   237    Quiz Answers   237    Activities   237 HOUR 18:  Extending a Class with Categories and Extensions   239 Comparing Categories and Protocols   239    Choosing When to Use a Category   240    Comparing Other Techniques with Categories   240 Comparing Categories with Subclasses   241    Modifying a Class Hierarchy   241    Confining Modifications to Categories   242 Working with Categories   242 Using Class Extensions   245 Working with Informal Protocols   246 Summary   246 Q&A   246 Workshop   247    Quiz   247    Quiz Answers   247    Activities   247 HOUR 19:  Using Associative References and Fast Enumeration   249 Catching Up on Objective-C 2.0 Time-Saving Features   249 Extending Classes by Adding Instance Variables (Sort of)   250    Adding an Associative Reference   251    Getting and Setting an Associative Reference   252    Removing an Associative Reference for a Key   254    Removing All Associative References from an Object.   254 Using Fast Enumeration   254    Using Fast Enumeration   254    Using Fast Enumeration with an NSEnumerator   256 Summary   256 Q&A   256 Workshop   257    Quiz   257    Quiz Answers   257    Activities   257 HOUR 20:  Working with Blocks   259 Revisiting Blocks   259 Looking at Callbacks   260    Considering Callback Routines   263 Introducing Blocks   264    Creating a Block as a Block Variable   264    Using a Block Variable   265 Exploring Blocks in Cocoa   266    NSString enumerateLinesUsingBlock   267    NSArray enumerateObjectsUsingBlock   268    NSSet enumerateObjectsUsingBlock   268 Looking Deeper into Cocoa Blocks and Memory   269 Summary   269 Q&A   269 Workshop   270    Quiz   270    Quiz Answers   270    Activities   270 PART IV:  BEYOND THE BASICS HOUR 21:  Handling Exceptions and Errors   271 Rethinking Exceptions and Errors   271 Introducing the Exception and Error Classes 272    Using Exceptions 273    Using Errors   273    Looking Inside NSException   274    Looking Inside NSError   274 Identifying an Exception   277 Throwing an Exception   278 Catching an Exception   280 Summary   280 Q&A   280 Workshop   280    Quiz   280    Quiz Answers   281    Activities   281 HOUR 22:  Grand Central Dispatch: Using Queues and Threading   283 Getting Started with Concurrency   283    Looking at Processors Inside Computers   283    Using Concurrency Without Rewriting User Apps   284    Using Threads for Concurrency   284    Introducing Grand Central Dispatch (GCD)   285 Introducing Queues   286    Dispatch Queues   287 Dispatch Sources 287    Operation Queues   287 Using Dispatch Queues   288    Using Global Concurrent Dispatch Queues   288    Adding a Task to a Global Concurrent Queue   289    Designing with Queues   290 Summary   290 Q&A   290 Workshop   291    Quiz   291    Quiz Answers   291    Activities   291 HOUR 23:  Working with the Debugger   293 Logging Information   293 Using Console Logs   294    Using NSLog   295    Enhancing NSLog   295 Using Smart Breakpoints   297    Enhancing Breakpoints with Messages   298    Breaking on a Condition   300 Summary   302 Q&A   302 Workshop   303    Quiz    303    Quiz Answers   303    Activities   303 HOUR 24:  Using Xcode Debug Gauges for Analysis   305 Putting Debug Gauges in Perspective   305    Monitoring CPU Utilization   306    Monitoring Memory Utilization   307    Monitoring Energy   308 Using Instruments   310 Summary   311 Q&A   311 Workshop   312    Quiz   312    Quiz Answers   312    Activities   312 PART V:  APPENDIXES Appendix A:  C Syntax Summary   313 Data Types   313    Enumerated Type   313    Struct Type   314    Pointers   314    Arrays   315 Control Structures   315    if Statements   315    switch Statements   315    Repeat Statements   316 Appendix B:  Apps, Packages, and Bundles   317 Looking Inside a Project Bundle   317 lproj Files   318 Asset Catalogs   318 plist Files   319 Precompiled Header Files (.pch)   319 Appendix C:  Archiving and Packaging Apps for Development and Testing   321 Archiving   321 Index   325

About the Author :
Jesse Feiler is a developer and author. He has been an Apple developer since before it became fashionable, and has worked with mobile devices starting with Apple’s Newton and continuing with the iOS products (iPhone, iPod touch, and iPad). His books include Sams Teach Yourself Core Data in 24 Hours, Data-Driven iOS Apps for iPad and iPhone with FileMaker Pro, FileMaker Pro in Depth (Sams/Pearson), Database-Driven Web Sites (Harcourt), Learning iCloud Data Management (Addison Wesley/Pearson), and iOS App Development for Dummies (Wiley). He has written about Objective-C and the Apple frameworks beginning with Rhapsody Developer’s Guide (AP Professional) and Mac OS X Developer’s Guide (Morgan Kaufmann). He is the author of MinutesMachine, the meeting management software for iPad, as well as Saranac River Trail app for iPhone and iPad. There are more details at champlainarts.com. A native of Washington DC, he has lived in New York City and currently lives in Plattsburgh, NY. He can be reached at northcountryconsulting.com.


Best Sellers


Product Details
  • ISBN-13: 9780672334498
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Sams Publishing
  • Height: 227 mm
  • No of Pages: 368
  • Weight: 680 gr
  • ISBN-10: 0672334496
  • Publisher Date: 20 Mar 2014
  • Binding: Paperback
  • Language: English
  • Spine Width: 18 mm
  • Width: 178 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Sams Teach Yourself Objective-C in 24 Hours
Pearson Education (US) -
Sams Teach Yourself Objective-C in 24 Hours
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Sams Teach Yourself Objective-C in 24 Hours

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!