It seems as if everyone is writing applications for Apple’s iPhone and iPad, but how do they all do it? It’s best to learn Objective-C, the native language of both the iOSand Mac OS X, but where to begin? Right here, even if you’ve never programmed before!Objective-C for Absolute Beginners will teach you how to write software for your Mac, iPhone,or iPad using Objective-C, an elegant and powerful language with a rich set of developer tools. Using a hands-on approach, you’ll learn to think in programming terms, how to use Objective-C to build program logic, and how towrite your own applications and apps.With over 50 collective years in software development and based on an approach pioneered at Carnegie Mellon University, the authors have developed a remarkably effective approach to learning Objective-C. Since the introduction of Apple’s iPhone, theauthors have taught hundreds of absolute beginners how to develop Mac, iPhone,and iPad apps, including many that became popular apps in the iTunes App Store.What you’ll learnThe fundamentals of computer programming: how to understand variables,design data structures, and work with file systemsThe logic of object-oriented programming: how to use Classes, Objects, and MethodsThe flexibility of Apple#226;?TMs developer tools: how to install Xcode and write programs in Objective-CThe power of Cocoa and Cocoa touch: how to make Mac OS Xapplications or iOS apps that do cool stuffWho this book is forEveryone! This book is for anyone who wants to learn to develop applications for the Mac or apps for the iPhone and iPad using the Objective-C programming language. No previous programming experience is necessary. Prelim......Page 1 Contents at a Glance......Page 6 Contents......Page 7 About the Authors......Page 12 About the Technical Reviewer......Page 13 Acknowledgments......Page 14 Introduction......Page 15 Thinking Like a Developer......Page 21 Completing the Development Cycle......Page 24 Introducing Object Oriented Programming......Page 26 Working with the Alice Interface......Page 28 Exercises......Page 31 Taking a Tour with Alice......Page 33 Navigation Menu......Page 34 World Window......Page 35 Classes, Objects, and Instances in Alice......Page 37 Editor Area......Page 38 Events Area......Page 39 Creating an Alice App—To the Moon Alice......Page 40 Your First Objective-C Program......Page 46 Installing Xcode......Page 47 Launching and Using Xcode......Page 50 Summary......Page 55 Exercises......Page 56 Bits......Page 57 Bytes......Page 59 Hexadecimal......Page 61 Data Types......Page 62 Using Variable and Data Types with Alice......Page 63 Data Types and Objective-C......Page 70 Identifying Problems......Page 74 Exercises......Page 76 Boolean Logic......Page 77 Truth Tables......Page 79 Comparison Operators......Page 81 Pseudo-code......Page 82 Design Requirements......Page 84 Flowcharting......Page 87 Designing and Flowcharting an Example App......Page 88 The App’s Design......Page 89 Using Loops to Repeat Program Statements......Page 90 Coding the Example App in Alice......Page 92 Coding the Example App in Objective-C......Page 94 Improving the Code Through Refactoring......Page 97 Moving Forward Without Alice......Page 98 Summary......Page 99 Exercises......Page 100 The Object......Page 101 What Is a Class......Page 102 Planning Classes......Page 103 Inheritance......Page 113 Eliminate Redundant Code......Page 114 Polymorphism......Page 115 Exercises......Page 116 A Brief History of Objective-C......Page 117 Understanding C Language Basics......Page 118 Putting the “Objective” into Objective-C......Page 120 Introducing Xcode......Page 125 Starting Up Xcode......Page 126 Creating Your First Project......Page 127 Adding a New Class......Page 128 Building and Running the New Program......Page 134 Summary......Page 135 Exercises......Page 136 Creating an Objective-C Class......Page 137 Sending Messages (Methods)......Page 139 Working with the Implementation File......Page 141 Implementing Methods......Page 143 Using Our New Class......Page 145 Overriding Default Behavior......Page 152 Accessing the Xcode Documentation......Page 153 Summary......Page 154 Exercises......Page 155 Programming Basics in Objective-C......Page 157 Creating a Simple Command Line Tool......Page 158 Introducing Instance Variables......Page 160 Accessing Instance Variables......Page 161 Using Getter and Setter Methods......Page 162 Introducing Properties......Page 164 Using Properties......Page 165 Creating the MyBookstore Program......Page 166 Using the NSMutableDictionary Class......Page 168 Making Our Object Do Something......Page 169 Implementing Behavior......Page 170 Cleaning Up Our Objects......Page 173 Using the Bookstore and Book Objects......Page 174 Exercises......Page 176 Introducing Boolean Logic......Page 177 Comparing Numbers......Page 178 Using Boolean Expressions......Page 183 Comparing Strings......Page 184 Comparing Dates......Page 186 Using the Switch Statement......Page 188 NSArray......Page 190 NSMutableArray......Page 191 NSMutableDictionary......Page 192 Summary......Page 193 Exercises......Page 194 Creating User Interfaces with Interface Builder......Page 195 Understanding Interface Builder......Page 196 The Model-View-Controller......Page 197 Human Interface Guidelines (HIGs)......Page 199 Creating an Example iPhone App with Interface Builder......Page 200 Using Outlets......Page 205 Implementing an Action......Page 206 Using Interface Builder......Page 207 Document Window......Page 208 Library Window......Page 209 Inspector Window......Page 210 Creating the View......Page 211 Connecting the Outlets and Objects......Page 212 Connecting Actions and Objects......Page 213 Implementation File......Page 215 Broken Connections in Interface Builder......Page 216 Exercises......Page 218 Memory, Addresses, and Pointers......Page 219 Bits, Bytes, and Bases......Page 220 Understanding Memory Address Basics......Page 224 Working with Automatic Variables and Pointers......Page 228 Deallocating Memory......Page 229 Using Special Pointers......Page 230 Using the Retain/Release Model......Page 232 Working with Implied Retain Messages......Page 234 Sending the dealloc Message......Page 235 If Things Go Wrong......Page 236 Summary......Page 237 Exercises......Page 238 Debugging Programs with Xcode......Page 239 Setting Breakpoints......Page 240 Debugging Basics......Page 242 Working with the Debugger Controls......Page 243 Debugging a Program......Page 244 Looking at the Thread Window and Call Stack......Page 245 Debugging Variables......Page 246 Deleting Multiple Breakpoints......Page 250 A Larger Call Stack......Page 251 Summary......Page 254 Exercises......Page 255 Preferences......Page 257 Writing Preferences......Page 258 Databases......Page 259 Storing Information in a Database......Page 260 Getting Started with Core Data......Page 261 The Model......Page 262 Setting Up the Interface......Page 270 Exercises......Page 275 Multiple Inheritance......Page 277 Understanding Protocols......Page 278 Understanding Delegates......Page 279 Next Steps......Page 280 Summary......Page 281 ¦ A......Page 283 ¦ C......Page 284 ¦D......Page 285 ¦I......Page 286 ¦......Page 287 ¦ N......Page 288 ¦ O......Page 289 ¦ R......Page 290 ¦ T......Page 291 ¦ Z ¦ W......Page 292 It seems as if everyone is writing applications for Apple's iPhone and iPad, but how do they all do it? It's best to learn Objective-C, the native language of both the iOS and Mac OS X, but where to begin? Right here, even if you've never programmed before! Objective-C for Absolute Beginners will teach you how to write software for your Mac, iPhone, or iPad using Objective-C, an elegant and powerful language with a rich set of developer tools. Using a hands-on approach, you'll learn to think in programming terms, how to use Objective-C to build program logic, and how to write your own applications and apps. With over 50 collective years in software development and based on an approach pioneered at Carnegie Mellon University, the authors have developed a remarkably effective approach to learning Objective-C. Since the introduction of Apple's iPhone, the authors have taught hundreds of absolute beginners how to develop Mac, iPhone,and iPad apps, including many that became popular apps in the iTunes App Store. It seems as if everyone is writing applications for Apple's iPhone and iPad, but how do they all do it? It's best to learn Objective-C, the native language of both the iOS and Mac OS X, but where to begin? Right here, even if you've never programmed before! Objective-C for Absolute Beginners will teach you how to write software for your Mac, iPhone, or iPad using Objective-C, an elegant and powerful language with a rich set of developer tools. Using a hands-on approach, you'll learn to think in programming terms, how to use Objective-C to build program logic, and how to write your own applications and apps. With over 50 collective years in software development and based on an approach pioneered at Carnegie Mellon University, the authors have developed a remarkably effective approach to learning Objective-C. Since the introduction of Apple's iPhone, the authors have taught hundreds of absolute beginners how to develop Mac, iPhone, and iPad apps, including many that became popular apps in the iTunes App Store
the Success Of Learn To Program Objective-c, From Apress, Allowed Many People To Migrate Their Existing Programming Skills To Objective-c. This Book Allows Even People Who Have Never Programmed Before, But Are Inspired By What Their Mac Or Iphone Can Do, And What Their Friends Have Achieved With It, To Program These Devices For The First Time, Even With No Programming Knowledge.
objective-c Is Gaining Popularity Faster Than Any Other Programming Language, Which Isn't Surprising Since It's The Native Development Language For Both Apple's Iphone Os And Mac Os X. Objective-c For Absolute Beginners Is The First Book To Introduce This Rich, Object-oriented Language To New Programmers.
Becoming a great iPhone/iPad or Mac programmer Programming basics It's all about the data Making decisions about and planning program flow Object oriented programmign with Objective-C Introducing Objective-C and Xcode Objective-C classes, objects, and methods Programming basics in Objective-C Comparing data Creating user interfaces with interface builder Memory, addresses, and pointers Debugging programs with Xcode Storing information Protocols and delegates.