O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Objects and Classes

Just like in Java, Objective-C uses a concept of classes that describe a real-world phenomenon, such as a Customer, a Book, or an Account. Classes are written in code and form the blueprint for instantiation of multiple objects from the same class. Each object is then a representation of a single real-world instance from the class. For instance, if you were to write an application to keep track of all the books you own, you would likely instantiate an object for every one of those books.

For the examples in the rest of this chapter, create a project in Xcode (File > New > Project). Use the Single View Application template under iOS Application. Name the product Objective-C Examples, and limit Devices to just target iPhone. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required