ios workshop xcode 4 ios 5 : “a primer”. objective-c ios applications are written in objective-c...

19
iOS WorkShoP Xcode 4 iOS 5 : “A Primer”

Upload: archibald-grant

Post on 26-Dec-2015

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

iOS WorkShoP

Xcode 4iOS 5

: “A Primer”

Page 2: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Objective-C

• iOS applications are written in Objective-C language using the Cocoa Touch library

• Objective-C is a simple extension of the C language

• Cocoa Touch is a collection of Objective-C classes

Page 3: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Important Resources

• iOS Dev Center• Objective-C a primer• iOS developer reference library• Stackoverflow

Page 4: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Course outlineDay 1• Xcode brief• A simple application (UIViewController)• UITableViewController• Distribution and Deployment• Testing and Debugging

Day 2• Tab bar - Navigation Application (UITabBarController, UINavigationController)• Core Location• Map Kit• UIGestures

• video

Page 5: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Some other notes

• iOS apps are built for optimized visual appeal• Forget about staying put• There is no need to learn everything, only

what you need• You are not always the first one to ask “that

question”

Page 6: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

X Platform

• Phone Gap, titanium, appcobra

Page 7: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Some questions to think about

• Free/Paid?• Accelerometer/compass sensors support?• In-App Purchase?• Push Notification?• AR• VR, Core Graphics, games, fast 2D graphics• Videoplayer• CG Transformation, animation

Page 8: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

• Audio Processing/noise filtering?• Vibration support?• Camera features?

Page 9: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Augmented Reality

Page 10: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Core Audio

• AudioPlayer• Audio QueueServices• Remote IO audio units

Page 11: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Xcode 4

• IDE for Mac OS, iOS application development• Latest version of Xcode to-date: Xcode 4

Page 12: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

About Xcode 4

• StoryBoarding• ARC memory management• Integrated Interface Builder – xib,nib files• Integrated instruments debugging tools• Code Signing• Application Loader• iPhone / iPad Simulator

Page 14: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Memory allocation

• Stack based/Heap Basedstack based : NSString *mystring = @"mystring";heap based :NSString *mystring=[[NSString alloc]

initWithString:@"hello"];

Page 15: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Navigationcontroller vs Tabbarcontroller

• dynamic vs static stack (list of controllers)

Page 16: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Methods

• + class methods (static methods) does not require class to be instantiated to be called

• instance methods - require an instance, called from the instance

• + does not mean public for public you can use @public, buy default all methods are private

Page 17: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Declaring Properties

• @property is shortcut to declaring properties• @synthesize is shortcut to implementing the

properties at compile time

Page 18: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

UIViewControllers

• Delegate methods

Page 19: IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is

Mutable vs Non Mutable objects

• NSArray• NSMutableArray