This document provides an overview of iPhone development for .NET developers. It discusses the tools needed like Xcode and the iOS SDK. It introduces Objective-C concepts like classes, methods, memory management using retain/release. It also covers view controllers, the model-view-controller pattern, and the iOS application lifecycle. The goal is to help .NET developers get started with iPhone development.
1 of 72
More Related Content
iPhone for .NET Developers
1. iPhone for .NET Developers
Ben Scheirman
Director of Development - ChaiONE
@subdigital
Tuesday, September 28, 2010
2. What you need
A Mac
Xcode
iPhone SDK (limited to Simulator)
iPhone Developer Program ($99 /year)
Tuesday, September 28, 2010
3. Objective-C
Based on C
Object Oriented
Dynamic
A little weird
Powerful
Tuesday, September 28, 2010
18. Objective-C Primer
De?ning Methods
-(void)showLoadingText:(NSString *)text animated:(BOOL)animated;
Tuesday, September 28, 2010
19. Objective-C Primer
De?ning Methods
Method name (selector)
-(void)showLoadingText:(NSString *)text animated:(BOOL)animated;
Tuesday, September 28, 2010
20. Objective-C Primer
De?ning Methods
Method name (selector)
-(void)showLoadingText:(NSString *)text animated:(BOOL)animated;
Return Type
Tuesday, September 28, 2010
21. Objective-C Primer
De?ning Methods
Method name (selector)
-(void)showLoadingText:(NSString *)text animated:(BOOL)animated;
Return Type
Instance method
Tuesday, September 28, 2010
22. Objective-C Primer
De?ning Methods
Method name (selector)
-(void)showLoadingText:(NSString *)text animated:(BOOL)animated;
Return Type
Parameters
Instance method
Tuesday, September 28, 2010
23. Memory Management
No garbage collection on the iPhone
Retain / Release
Tuesday, September 28, 2010
57. Dot Syntax Dogma
Use dot syntax if you like it
Just be aware of what it's hiding
Tuesday, September 28, 2010
58. Xcode
Your IDE
Code completion
Interactive Debugger
Lacks good refactoring tools
Tuesday, September 28, 2010
59. Interface Builder
Drag-n-drop UI building
Layouts are de?ned in XIBs (XML representation).
Usually called "Nibs"
"Make connections" with classes de?ned in Xcode
variables --> UI components
UI events --> methods
Tuesday, September 28, 2010
60. Instruments
Find Memory Leaks
Analyze Memory Usage
Track down slow code
Tuesday, September 28, 2010
61. iOS SDK
Accelerate CoreMotion
AddressBook CoreTelephony
AudioToolbox CoreText
Your app
AVFoundation CoreVideo
UIKit CoreAudio GameKit
CoreFoundation CoreData iAd
CoreGraphics CoreLocation MapKit
CFNetwork StoreKit
Tuesday, September 28, 2010
63. The View Controller
Handles setup logic for a screen
Handles user input
Interacts with the model
Contains 1 or more views
Tuesday, September 28, 2010
64. The View
Visual representation
Drawing
Laying out subviews (autorotation)
May Handle touch events
Tuesday, September 28, 2010