This document provides an overview of iPhone application development. It discusses:
1) The four aspects of iPhone app development - the relationship with Apple, developer tools, the iPhone platform, and Objective-C programming language.
2) The developer tools used for iPhone app development including Xcode, iPhone Simulator, Interface Builder, and Instruments.
3) The layers that make up the iPhone platform including the core OS, core services, and media layer.
4) The process for becoming an iPhone developer including signing up with the Developer Center, Developer Program, and iTunes Connect.
The document aims to give the reader a high-level understanding of what is involved in iPhone application development.
15. iPhone application development has four aspects:
• Your relationship with Apple,
• the iPhone developer tools,
• the iPhone Platform, and
• the Objective-C programming language.
16. iPhone application development has four aspects:
• Your relationship with Apple,
• the iPhone developer tools,
• the iPhone Platform, and
• the Objective-C programming language.
17. iPhone application development has four aspects:
• Your relationship with Apple,
• the iPhone developer tools,
• the iPhone Platform, and
• the Objective-C programming language.
18. iPhone application development has four aspects:
• Your relationship with Apple,
• the iPhone developer tools,
• the iPhone Platform, and
• the Objective-C programming language.
19. iPhone application development has four aspects:
• Your relationship with Apple,
• the iPhone developer tools,
• the iPhone Platform, and
• the Objective-C programming language.
21. • Apple makes the device.
• Apple provides the tools.
• Apple approves your apps.
Apple makes the device.
Apple provides the tools.
Apple approves your apps.
22. • You will have a relationship with Apple.
You will have a relationship with Apple.
Your relationship is mediated by three web sites:
37. From the iPhone Dev Cenver,
• you learn more about the Developer Program.
38. From the iPhone Dev Cenver,
• you learn more about the Developer Program.
39. “iPhone Developer Program: The fastest path from code to customer.”
The Program isnʼt just the fastest path: itʼs the only path.
To put your App on a device or on the store, you need to join the program.
40. After signing up, you need to be approved.
With the Standard program, you sign up as an individual or as a corporation.
We signed up as a corporation. We needed to fax Apple a copy of our Articles of Incorporation.
Then they called us for confirmation.
Then we needed to call them again after they sent us the wrong form email.
• In total, the process took us about a month.
41. After signing up, you need to be approved.
With the Standard program, you sign up as an individual or as a corporation.
We signed up as a corporation. We needed to fax Apple a copy of our Articles of Incorporation.
Then they called us for confirmation.
Then we needed to call them again after they sent us the wrong form email.
• In total, the process took us about a month.
44. iPhone Developer
Program Portal
The portal provides you with provisioning profiles.
45. A provisioning profile allows you to sign apps.
A signature gives you permission to test an app on a device or to prepare an app for distribution.
46. iPhone Development
Certificate
App ID
Unique Device ID
You need to collect three things in order to generate a provisioning
profile:
47. iPhone Development
who
Certificate
App ID
Unique Device ID
An iPhone Development Certificate tells who will use the profile.
48. iPhone Development
who
Certificate
App ID what
Unique Device ID
An app ID identifies what app the person is working
on.
49. iPhone Development
who
Certificate
App ID what
Unique Device ID where
A unique device ID determines where the app will be used, which device or the
store.
50. It's a bit like the game Cleudo: who done it, where, and with what
weapon.
55. From iTunes Connect,
• you fill out a paid applications contact so that you can sell your app on the store.
You need to provide Apple with your bank and tax info.
They need to verify it. The turnaround can be a few days or weeks.
56. From iTunes Connect,
• you fill out a paid applications contact so that you can sell your app on the store.
You need to provide Apple with your bank and tax info.
They need to verify it. The turnaround can be a few days or weeks.
57. While youʼre waiting for your contract, you can upload your app and its accompanying
artwork.
58. At this point, you are waiting for your contract and for app approval.
Though people have been stuck waiting,
my first app was approved within 24 hours.
Since then, Iʼve always received feedback within a few days.
73. Letʼs talk about tools.
The iPhone SDK includes everything you need for iPhone (and Mac) development.
74. We will use four tools:
• Xcode
• The iPhone Simulator
• Interface Builder
• Instruments
75. We will use four tools:
• Xcode
• The iPhone Simulator
• Interface Builder
• Instruments
76. We will use four tools:
• Xcode
• The iPhone Simulator
• Interface Builder
• Instruments
77. We will use four tools:
• Xcode
• The iPhone Simulator
• Interface Builder
• Instruments
78. We will use four tools:
• Xcode
• The iPhone Simulator
• Interface Builder
• Instruments
79. Xcode is Apple's integrated development environment. We will spend most of our time in
it.
80. Xcode is a front end for command-line utilities:
• compiling with gcc,
• linking with ld,
• debugging with gdb, and
• version control (also called source code management): svn, cvs, or Perforce.
81. • compling ↣ gcc
Xcode is a front end for command-line utilities:
• compiling with gcc,
• linking with ld,
• debugging with gdb, and
• version control (also called source code management): svn, cvs, or Perforce.
82. • compling ↣ gcc
• linking ↣ ld
Xcode is a front end for command-line utilities:
• compiling with gcc,
• linking with ld,
• debugging with gdb, and
• version control (also called source code management): svn, cvs, or Perforce.
83. • compling ↣ gcc
• linking ↣ ld
• debugging ↣ gdb
Xcode is a front end for command-line utilities:
• compiling with gcc,
• linking with ld,
• debugging with gdb, and
• version control (also called source code management): svn, cvs, or Perforce.
84. • compling ↣ gcc
• linking ↣ ld
• debugging ↣ gdb
• SCM ↣ svn, cvs, Perforce
Xcode is a front end for command-line utilities:
• compiling with gcc,
• linking with ld,
• debugging with gdb, and
• version control (also called source code management): svn, cvs, or Perforce.
120. The iPhone OS provides several layers of services.
Services on higher layers abstract away details from services on lower layers.
Services on lower layers provide more flexibility as well as more inconvenience and tedium.
Letʼs start at the bottom.
121. Just like Mac OS X, the iPhone is built on the Mach UNIX kernel.
Core OS exposes common UNIX libraries.
122. Core OS
POSIX threads for in shared state multithreaded concurrency.
• BSD sockets for low level TCP and UDP networking.
• Standard C libraries including stdio, stdlib, and the rest.
123. Core OS
• POSIX Threads ↣ Concurrency
POSIX threads for in shared state multithreaded concurrency.
• BSD sockets for low level TCP and UDP networking.
• Standard C libraries including stdio, stdlib, and the rest.
124. Core OS
• POSIX Threads ↣ Concurrency
• BSD Sockets ↣ TCP & UDP Networking
POSIX threads for in shared state multithreaded concurrency.
• BSD sockets for low level TCP and UDP networking.
• Standard C libraries including stdio, stdlib, and the rest.
125. Core OS
• POSIX Threads ↣ Concurrency
• BSD Sockets ↣ TCP & UDP Networking
• <stdio.h> <stdlib.h> ...the rest
POSIX threads for in shared state multithreaded concurrency.
• BSD sockets for low level TCP and UDP networking.
• Standard C libraries including stdio, stdlib, and the rest.
126. Core services include OS X specific libraries as well as popular, relatively new C libraries.
127. Core services include OS X specific libraries as well as popular, relatively new C libraries.
128. Core Services
Core foundation is the plain C library which mirrors Objective-C Foundation classes.
• Core Location enables your iPhone to determine where it is.
• SQLite is for lightweight SQL databases.
• libxml2 is for heavy duty XML processing.
129. Core Services
• Core Foundation ↣ Foundation Mirror
Core foundation is the plain C library which mirrors Objective-C Foundation classes.
• Core Location enables your iPhone to determine where it is.
• SQLite is for lightweight SQL databases.
• libxml2 is for heavy duty XML processing.
130. Core Services
• Core Foundation ↣ Foundation Mirror
• Core Location ↣ GPS
Core foundation is the plain C library which mirrors Objective-C Foundation classes.
• Core Location enables your iPhone to determine where it is.
• SQLite is for lightweight SQL databases.
• libxml2 is for heavy duty XML processing.
131. Core Services
• Core Foundation ↣ Foundation Mirror
• Core Location ↣ GPS
• SQLite ↣ SQL Database
Core foundation is the plain C library which mirrors Objective-C Foundation classes.
• Core Location enables your iPhone to determine where it is.
• SQLite is for lightweight SQL databases.
• libxml2 is for heavy duty XML processing.
132. Core Services
• Core Foundation ↣ Foundation Mirror
• Core Location ↣ GPS
• SQLite ↣ SQL Database
• libxml2 ↣ XML Processing
Core foundation is the plain C library which mirrors Objective-C Foundation classes.
• Core Location enables your iPhone to determine where it is.
• SQLite is for lightweight SQL databases.
• libxml2 is for heavy duty XML processing.
133. The media layer supports 2D and 3D graphics, audio, and
video.
134. The media layer supports 2D and 3D graphics, audio, and
video.
135. Media
For audio, we have Core Audio and OpenAL.
• OpenGL ES is geared toward 3D graphics.
• Quartz, also called Core Graphics, provides 2D graphics support.
• Core Animation provides all those animated effects we see on the iPhone and the Mac
• including this presentation. •
136. Media
• Core Audio & OpenAL ↣ Audio
For audio, we have Core Audio and OpenAL.
• OpenGL ES is geared toward 3D graphics.
• Quartz, also called Core Graphics, provides 2D graphics support.
• Core Animation provides all those animated effects we see on the iPhone and the Mac
• including this presentation. •
137. Media
• Core Audio & OpenAL ↣ Audio
• OpenGL ES ↣ 3D Graphics
For audio, we have Core Audio and OpenAL.
• OpenGL ES is geared toward 3D graphics.
• Quartz, also called Core Graphics, provides 2D graphics support.
• Core Animation provides all those animated effects we see on the iPhone and the Mac
• including this presentation. •
138. Media
• Core Audio & OpenAL ↣ Audio
• OpenGL ES ↣ 3D Graphics
• Quartz (Core Graphics) ↣ 2D Graphics
For audio, we have Core Audio and OpenAL.
• OpenGL ES is geared toward 3D graphics.
• Quartz, also called Core Graphics, provides 2D graphics support.
• Core Animation provides all those animated effects we see on the iPhone and the Mac
• including this presentation. •
139. Media
• Core Audio & OpenAL ↣ Audio
• OpenGL ES ↣ 3D Graphics
• Quartz (Core Graphics) ↣ 2D Graphics
• Core Animation ↣ Animated Effects
For audio, we have Core Audio and OpenAL.
• OpenGL ES is geared toward 3D graphics.
• Quartz, also called Core Graphics, provides 2D graphics support.
• Core Animation provides all those animated effects we see on the iPhone and the Mac
• including this presentation. •
140. For audio, we have Core Audio and OpenAL.
• OpenGL ES is geared toward 3D graphics.
• Quartz, also called Core Graphics, provides 2D graphics support.
• Core Animation provides all those animated effects we see on the iPhone and the Mac
• including this presentation. •
141. Cocoa Touch contains the Objective-C frameworks you use to build your application.
142. Cocoa Touch contains the Objective-C frameworks you use to build your application.
143. Foundation
Foundation is the essential Objective-C framework. Foundation contains:
• NSObject, the root of the Objective-C class hierarchy,
• Data type wrappers,
• Collections,
• Local filesystem access,
• HTTP requests, and much more.
144. Foundation
• NSObject
Foundation is the essential Objective-C framework. Foundation contains:
• NSObject, the root of the Objective-C class hierarchy,
• Data type wrappers,
• Collections,
• Local filesystem access,
• HTTP requests, and much more.
145. Foundation
• NSObject
• NSString, NSNumber, NSNull
Foundation is the essential Objective-C framework. Foundation contains:
• NSObject, the root of the Objective-C class hierarchy,
• Data type wrappers,
• Collections,
• Local filesystem access,
• HTTP requests, and much more.
146. Foundation
• NSObject
• NSString, NSNumber, NSNull
• NSArray, NSDictionary, NSSet
Foundation is the essential Objective-C framework. Foundation contains:
• NSObject, the root of the Objective-C class hierarchy,
• Data type wrappers,
• Collections,
• Local filesystem access,
• HTTP requests, and much more.
147. Foundation
• NSObject
• NSString, NSNumber, NSNull
• NSArray, NSDictionary, NSSet
• NSFileManager, NSFileHandle
Foundation is the essential Objective-C framework. Foundation contains:
• NSObject, the root of the Objective-C class hierarchy,
• Data type wrappers,
• Collections,
• Local filesystem access,
• HTTP requests, and much more.
148. Foundation
• NSObject
• NSString, NSNumber, NSNull
• NSArray, NSDictionary, NSSet
• NSFileManager, NSFileHandle
• NSURL, NSURLRequest, NSURLResponse
Foundation is the essential Objective-C framework. Foundation contains:
• NSObject, the root of the Objective-C class hierarchy,
• Data type wrappers,
• Collections,
• Local filesystem access,
• HTTP requests, and much more.
149. CocoaAsyncSocket
For TCP and UDP networking, nothing beats CocoaAsyncSocket.
Though not part of the iPhone SDK, CocoaAsyncSocket is such an valuable networking library
that I can't help but mention it.
150. UIKit
UIKit contains all the standard views and controllers which make up your application.
• From the time the user taps the application icon to the moment when application execution terminates, UIKit
is in charge.
151. UIKit
UIKit contains all the standard views and controllers which make up your application.
• From the time the user taps the application icon to the moment when application execution terminates, UIKit
is in charge.
152. UIKit handles the main event loop and calls you when it expects a response.
How does it work?
153. How does the touch screen interface relate to the source code
implementation?
162. The cell contains four labels and a special clock face.
This is how the Clock application is divided into views.
Each view is a UIView subclass.
163. Here, the views are relabed with class names.
The status bar is associated with the UIApplication class.
The window is a UIWindow.
The tab bar is a UITabBar, etc.
The cell is a UITableViewCell.
The labels are UILabels,
and the clock face is some custom UIView.
164. A viewʼs responsibility is to represent some piece of information or to layout some subviews.
UIKit uses controller classes to update and to keep track of views.
168. A UITabBarController mangages a tab bar.
It responds to touches on the bar by displaying the corresponding tab.
Each tab has a controller.
169. This diagram shows a UITabBarController with several view controllers.
The title of a controller provides the label for its tab bar button.
The controllerʼs tab bar item tells the tab bar controller which image to show on the tab bar button.
The selected controllerʼs view fills the space above the tab bar.
170. In our case, the view is associated with the controller for the World
Clock.
171. Since the World Clock has a navigation bar on top, its controller is a UINavigationController.
A navigation controller manages a stack of controllers whose views are pushed in from the right.
In the clock, the stack only contains one controller.
172. So letʼs look at the address book for a minute.
When you touch a Johnʼs name, ...
173. ...his info slides right in.
The upper left corner provides a back button.
174. We have three controllers on the UINavigationContoller
stack.
175. At the top of the stack, in the bottom right corner of the diagram, we see Johnʼs info.
His info is pushed on top up of the All Contacts controller,
which, in turn, is pushed on top of the Groups controller.
176. The title of the top controller is used as the title of the navigation bar.
The view fills the space under the navigation bar.
The navigation item populates the navigation bar with other information
including custom bar buttons.
177. The title of the top controller is used as the title of the navigation bar.
The view fills the space under the navigation bar.
The navigation item populates the navigation bar with other information
including custom bar buttons.
179. Notice that the UINavigationController is contained in the UITabBarController.
180. Whenever you have a tab bar controller and a navigation controller,
the tab bar should be on the outside and the navigation controller should be on the inside.
Iʼve tried it the other way. It just doesnʼt work: the controllers get very confused.
182. Why itʼs a UITableViewController.
The UITableViewController serves as the data source for the table view.
It tells the table how many rows there are and what cell to put in each visible row.
183. How does the table view controller know what to put in the table?
How does it remember the list of clocks?
The controller asks the model.
I canʼt be sure how Apple wrote the Clock app, but we can imagine what the model is like.
Since the clock only needs to keep track of a little data,
they shouldnʼt bother with SQLite databases or external property list files.
184. Instead, they probably store all the data in the user defaults database.
What data specifically?
185. Again, I canʼt be sure, but I guess they use a time zone
object.
186. They need to keep an array of time zones: one for each clock.
Since you can add and remove clocks, the array might be mutable.
187. For each tab in the app, they need to keep some data.
So I suppose they use an array for that.
188. Finally, they could use an index to remember which of the tabs is
selected.
189. Step back.
• We have our model,
• our view,
• and our controller.
• Combine them...
190. Model
Step back.
• We have our model,
• our view,
• and our controller.
• Combine them...
191. View Model
Step back.
• We have our model,
• our view,
• and our controller.
• Combine them...
192. View Controller Model
Step back.
• We have our model,
• our view,
• and our controller.
• Combine them...
193. Step back.
• We have our model,
• our view,
• and our controller.
• Combine them...
215. Runtime
Objective-C uses a lightweight runtime library in contrast to the virtual machines of Java and .Net.
• Objects are pointers to C structures.
• Methods are C functions.
• Classes are constructed at runtime.
216. Runtime
• Object ↣ struct objc_object *
Objective-C uses a lightweight runtime library in contrast to the virtual machines of Java and .Net.
• Objects are pointers to C structures.
• Methods are C functions.
• Classes are constructed at runtime.
217. Runtime
• Object ↣ struct objc_object *
• Method ↣ C Function
Objective-C uses a lightweight runtime library in contrast to the virtual machines of Java and .Net.
• Objects are pointers to C structures.
• Methods are C functions.
• Classes are constructed at runtime.
218. Runtime
• Object ↣ struct objc_object *
• Method ↣ C Function
• Class ↣ Runtime Constructed
Objective-C uses a lightweight runtime library in contrast to the virtual machines of Java and .Net.
• Objects are pointers to C structures.
• Methods are C functions.
• Classes are constructed at runtime.
220. Directives
Directives are prefixed by the at-sign.
• These are the ones I type most often.
• These, though common, are usually typed by Xcode when you make a new class.
• Exceptions arenʼt often caught in Objective-C. They usually represent program errors.
• I rarely use any of the directives in this last group.
221. Directives
• @"string literal" @property @synthesize
@selector()
Directives are prefixed by the at-sign.
• These are the ones I type most often.
• These, though common, are usually typed by Xcode when you make a new class.
• Exceptions arenʼt often caught in Objective-C. They usually represent program errors.
• I rarely use any of the directives in this last group.
222. Directives
• @"string literal" @property @synthesize
@selector()
• @interface @implementation @protocol
@class @end
Directives are prefixed by the at-sign.
• These are the ones I type most often.
• These, though common, are usually typed by Xcode when you make a new class.
• Exceptions arenʼt often caught in Objective-C. They usually represent program errors.
• I rarely use any of the directives in this last group.
223. Directives
• @"string literal" @property @synthesize
@selector()
• @interface @implementation @protocol
@class @end
• @dynamic @try @throw @catch() @finally
Directives are prefixed by the at-sign.
• These are the ones I type most often.
• These, though common, are usually typed by Xcode when you make a new class.
• Exceptions arenʼt often caught in Objective-C. They usually represent program errors.
• I rarely use any of the directives in this last group.
224. Directives
• @"string literal" @property @synthesize
@selector()
• @interface @implementation @protocol
@class @end
• @dynamic @try @throw @catch() @finally
• @protocol() @private @projected @public
@synchronized() @encode()
Directives are prefixed by the at-sign.
• These are the ones I type most often.
• These, though common, are usually typed by Xcode when you make a new class.
• Exceptions arenʼt often caught in Objective-C. They usually represent program errors.
• I rarely use any of the directives in this last group.
225. Messages
Method calls, also known as messages, use square brackets.
• Here the receiver is a variable named “string” and the method name, or selector, is “integerValue”.
• Arguments come after a colon.
• For multiple arguments, the method name is broken into parts: one for each argument.
The selector here is “stringByReplacingOccurrencesOfString:withString:”.
In Objective-C, they like descriptive method names.
• A method can take a variable number of comma-seperated arguments after its last colon.
226. Messages
• [string integerValue]
Method calls, also known as messages, use square brackets.
• Here the receiver is a variable named “string” and the method name, or selector, is “integerValue”.
• Arguments come after a colon.
• For multiple arguments, the method name is broken into parts: one for each argument.
The selector here is “stringByReplacingOccurrencesOfString:withString:”.
In Objective-C, they like descriptive method names.
• A method can take a variable number of comma-seperated arguments after its last colon.
227. Messages
• [string integerValue]
• [string isEqualToString:anotherString]
Method calls, also known as messages, use square brackets.
• Here the receiver is a variable named “string” and the method name, or selector, is “integerValue”.
• Arguments come after a colon.
• For multiple arguments, the method name is broken into parts: one for each argument.
The selector here is “stringByReplacingOccurrencesOfString:withString:”.
In Objective-C, they like descriptive method names.
• A method can take a variable number of comma-seperated arguments after its last colon.
228. Messages
• [string integerValue]
• [string isEqualToString:anotherString]
• [string stringByReplacingOccurrencesOfString:oneString
withString:anotherString]
Method calls, also known as messages, use square brackets.
• Here the receiver is a variable named “string” and the method name, or selector, is “integerValue”.
• Arguments come after a colon.
• For multiple arguments, the method name is broken into parts: one for each argument.
The selector here is “stringByReplacingOccurrencesOfString:withString:”.
In Objective-C, they like descriptive method names.
• A method can take a variable number of comma-seperated arguments after its last colon.
229. Messages
• [string integerValue]
• [string isEqualToString:anotherString]
• [string stringByReplacingOccurrencesOfString:oneString
withString:anotherString]
• [NSString stringWithFormat:@"%d %@", number, string]
Method calls, also known as messages, use square brackets.
• Here the receiver is a variable named “string” and the method name, or selector, is “integerValue”.
• Arguments come after a colon.
• For multiple arguments, the method name is broken into parts: one for each argument.
The selector here is “stringByReplacingOccurrencesOfString:withString:”.
In Objective-C, they like descriptive method names.
• A method can take a variable number of comma-seperated arguments after its last colon.
230. Method Declarations
Method declarations are similar to message sends.
• A minus-sign indicates an instance method.
A plus sign would indicate a class method. The return type is placed in parenthesis.
• The type of a parameter is wrapped in parenthesis after the colon and before the parameter name.
• As with messges, the selector is split when there are multiple parameters.
• Hereʼs a class method. The comma and ellipses after the last parameter indicate that the method accepts a
variable number of arguments.
231. Method Declarations
• - (NSInteger)integerValue;
Method declarations are similar to message sends.
• A minus-sign indicates an instance method.
A plus sign would indicate a class method. The return type is placed in parenthesis.
• The type of a parameter is wrapped in parenthesis after the colon and before the parameter name.
• As with messges, the selector is split when there are multiple parameters.
• Hereʼs a class method. The comma and ellipses after the last parameter indicate that the method accepts a
variable number of arguments.
232. Method Declarations
• - (NSInteger)integerValue;
• - (BOOL)isEqualToString:(NSString *)aString;
Method declarations are similar to message sends.
• A minus-sign indicates an instance method.
A plus sign would indicate a class method. The return type is placed in parenthesis.
• The type of a parameter is wrapped in parenthesis after the colon and before the parameter name.
• As with messges, the selector is split when there are multiple parameters.
• Hereʼs a class method. The comma and ellipses after the last parameter indicate that the method accepts a
variable number of arguments.
233. Method Declarations
• - (NSInteger)integerValue;
• - (BOOL)isEqualToString:(NSString *)aString;
• - (NSString *)stringByReplacingOccurrencesOfString:
(NSString *)target withString:(NSString *)replacement;
Method declarations are similar to message sends.
• A minus-sign indicates an instance method.
A plus sign would indicate a class method. The return type is placed in parenthesis.
• The type of a parameter is wrapped in parenthesis after the colon and before the parameter name.
• As with messges, the selector is split when there are multiple parameters.
• Hereʼs a class method. The comma and ellipses after the last parameter indicate that the method accepts a
variable number of arguments.
234. Method Declarations
• - (NSInteger)integerValue;
• - (BOOL)isEqualToString:(NSString *)aString;
• - (NSString *)stringByReplacingOccurrencesOfString:
(NSString *)target withString:(NSString *)replacement;
• + (id)stringWithFormat:(NSString *)format, ...;
Method declarations are similar to message sends.
• A minus-sign indicates an instance method.
A plus sign would indicate a class method. The return type is placed in parenthesis.
• The type of a parameter is wrapped in parenthesis after the colon and before the parameter name.
• As with messges, the selector is split when there are multiple parameters.
• Hereʼs a class method. The comma and ellipses after the last parameter indicate that the method accepts a
variable number of arguments.
235. Dot Syntax
• [label text]
• [label setText:string]
Historically, this is how you would get and set a propery in Objective-C.
• But that isnʼt the way itʼs usually done on the iPhone.
236. Dot Syntax
Historically, this is how you would get and set a propery in Objective-C.
• But that isnʼt the way itʼs usually done on the iPhone.
237. Dot Syntax
Instead you use a dot for getters and setters. The meaning is the same.
The compiled code is the same. Only the notation differs.
238. Dot Syntax
• label.text
• label.text = string
Instead you use a dot for getters and setters. The meaning is the same.
The compiled code is the same. Only the notation differs.
239. Fast Enumeration
for (NSString *name in names) {
...
}
Last but not least, Objective-C has a special for loop to iterate across
collections.
240. Thatʼs Objective-C in a too-small nutshell.
Your printed materials include a concise reference to Objective-C.
The materials also include a reference to C and the C Preprocessor.
241. To summarize:
• Your relationship to Apple defines the process of iPhone development.
• The SDK provides you with the tools.
• The iPhone platform provides you with capabilities.
• Objective-C provides you with the language.
• These four aspects cover everything you need in order to develop on the iPhone and get those...
242. To summarize:
• Your relationship to Apple defines the process of iPhone development.
• The SDK provides you with the tools.
• The iPhone platform provides you with capabilities.
• Objective-C provides you with the language.
• These four aspects cover everything you need in order to develop on the iPhone and get those...
243. To summarize:
• Your relationship to Apple defines the process of iPhone development.
• The SDK provides you with the tools.
• The iPhone platform provides you with capabilities.
• Objective-C provides you with the language.
• These four aspects cover everything you need in order to develop on the iPhone and get those...
244. To summarize:
• Your relationship to Apple defines the process of iPhone development.
• The SDK provides you with the tools.
• The iPhone platform provides you with capabilities.
• Objective-C provides you with the language.
• These four aspects cover everything you need in order to develop on the iPhone and get those...
245. To summarize:
• Your relationship to Apple defines the process of iPhone development.
• The SDK provides you with the tools.
• The iPhone platform provides you with capabilities.
• Objective-C provides you with the language.
• These four aspects cover everything you need in order to develop on the iPhone and get those...
246. To summarize:
• Your relationship to Apple defines the process of iPhone development.
• The SDK provides you with the tools.
• The iPhone platform provides you with capabilities.
• Objective-C provides you with the language.
• These four aspects cover everything you need in order to develop on the iPhone and get those...
248. The rest of the course is a tutorial in which weʼll build three
apps.
249. Temp
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
250. Temp
• Interface Builder
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
251. Temp
• Interface Builder
• Views & Controls
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
252. Temp
• Interface Builder
• Views & Controls
• Text Fields
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
253. Temp
• Interface Builder
• Views & Controls
• Text Fields
• Alerts
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
254. Temp
• Interface Builder
• Views & Controls
• Text Fields
• Alerts
• Autorotation
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
255. Temp
• Interface Builder
• Views & Controls
• Text Fields
• Alerts
• Autorotation
• Localization
We start with a temperature converter.
• Weʼll learn all about Interface Builder,
• views and controls,
• how to use text fields,
• alert windows,
• landscape autorotation,
• and weʼll localize the app.
256. The Elements
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
257. The Elements
• Table Views
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
258. The Elements
• Table Views
• Plists
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
259. The Elements
• Table Views
• Plists
• View Controllers
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
260. The Elements
• Table Views
• Plists
• View Controllers
• Table View Cells
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
261. The Elements
• Table Views
• Plists
• View Controllers
• Table View Cells
• Web Views
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
262. The Elements
• Table Views
• Plists
• View Controllers
• Table View Cells
• Web Views
• Animation
Our big example is a viewer for the atomic elements sorted in different ways.
• Weʼll learn all about table views,
• plists,
• view controllers,
• table view cells,
• web views,
• animation, and a whole lot more.
263. GLGravity
As a final treat, weʼll play with
• OpenGL ES
• and the iPhoneʼs accelerometer.
264. GLGravity
• OpenGL ES
As a final treat, weʼll play with
• OpenGL ES
• and the iPhoneʼs accelerometer.
265. GLGravity
• OpenGL ES
• Accelerometer
As a final treat, weʼll play with
• OpenGL ES
• and the iPhoneʼs accelerometer.