iPhone Development

hihatcloverSoftware and s/w Development

Jul 4, 2012 (4 years and 11 months ago)

232 views

iPhone Development
for the Flash Developer
by Demian Borba
demian@actioncriacoes.net
Agenda

Demian Background & Why iPhone

Success Cases

Objective-C 2.0 vs ActionScript 3.0
(Similarities)

Demo: Simple App #1 SliderValue
(Flash/Flex Overview + iPhone App from Scratch)

Demo: Simple App #2: Touches
(Flash/Flex Overview + iPhone App from Scratch)

Demo: Sample Code
(from Files)

if we have time

Resources to Start
Demian Background
& Why iPhone
About Demian
Background
Working with
Flash since 1998
Trying to migrate to
Flex for 2 months now
(

?

games, bigger applications,
MVC, + reusability )
Learning Approach
Views
FLA (SWC)
Controllers & Models
SRC
Why iPhone?
Surf Alarm AIR App
Coolest App @ Adobe FlashCamp 2008
Why iPhone?
Surf Alarm iPhone App
By the beginning of April 2009:
30M devices sold (iPhones & iPod Touches)
Success
Cases
Success Cases
App:
iSHOOT
Earned:
$800,000 in five months
Ethan Nicholas (Sun)
Success Cases
App:
iSteam
(built in 7 days)
Earned:
$100,000 in three months
Kostas Eleftheriou
Success Cases
Objective-C 2.0
vs ActionScript 3.0
(similarities)
Flash Platform Development World
Flex
Flash
textView.setStringValue(“Hello”);
iPhone Development World
Flash Platform Development World
iPhone Development World
A Flash Comparison
Xcode
Flash Comparison
Objective-C & ActionScript 3.0
Objective-C & ActionScript 3.0
(if)
Objective-C & ActionScript 3.0
(for)
Objective-C & ActionScript 3.0
(Comments)
Objective-C & ActionScript 3.0
(Properties)
Objective-C & ActionScript 3.0
(Properties)
Objective-C & ActionScript 3.0
(Methods)
An ActionScript Class
package
{
import flash.display.*;
public class YourClass extends DisplayObject
{
public var yourVariable:String;
private var _anotherVariable:String;
private var privateVariable:String;

public function YourClass()
{}
public function get anotherVariable():String
{
return this._anotherVariable;
}
public function set anotherVariable(value:String):void
{
this._anotherVariable = value;
}
}
}
An Objective-C Class
Breaking Down An ActionScript Class
package
{
import flash.display.*;
public class YourClass extends DisplayObject
{
public var yourVariable:String;
private var _anotherVariable:String;
private var privateVariable:String;

public function YourClass()
{}

public function get anotherVariable():String
{
return this._anotherVariable;
}
public function set anotherVariable(value:String):void
{
this._anotherVariable = value;
}

}
}
An Objective-C Class
@interface YourClass : NSObject
{
NSString *yourVariable;
NSString *anotherVariable;
NSString *privateVariable;
}
@property (nonatomic, retain) NSString *yourVariable;
@property (nonatomic, retain) NSString *anotherVariable;
@implementation YourClass
@synthesize yourVariable;
-(NSString) anotherVariable
{
return self.anotherVariable;
}
-(void) setAnotherVariable:(NSString *) value
{
self.anotherVariable = value;
}
App LifeCycle
MVC
Demo
* SliderValue
* Touches
+ (if we have time)
Resources
Where to Start
?
- Enroll in the iPhone Developer Program ($99/year)
- iTunes Podcast : iPhone Application Programming (Stanford Class)
- Books
- Online Tutorials
Thank You.
by Demian Borba
demian@actioncriacoes.net