iStarted- And You Can Too! - Das Haus von Ruh

mewlingtincupΛογισμικό & κατασκευή λογ/κού

9 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

72 εμφανίσεις

iStarted
-

And You
Can Too!

A Beginner’s Guide to iOS Programming

Teaser, not a Tutorial

Prerequisites

Think Different

Dress the Same

1. The Uniform

2. The
Computer

Mac Mini
$599

3. The
Development
Environment

Register as a Developer
FREE


Download XCode from Mac
App Store
FREE


Download Esri iOS SDK
FREE

4. The Toys

iPhone 4S
$199

iPad 2
$499


Developer license*
$99
/year

5. The Help

iOS Programming: The Big
Nerd Ranch Guide (2nd Ed.)
$30.42


Objective
-
C Programming
$22.63


Whitepapers, Tutorials,
Videos
FREE

$153

-

$950

(Not Counting the Clothes)

Objective C

Data types

Expressions

Program Control

Preprocessor

Separate header files

Classes

Single inheritance

Dynamic binding

Protocols (“Interfaces”)

Properties

Methods

IAGSLayerView* InsertMapLayer(


AGSLayer* mapLayer,


String* name,


unsigned int index);


result = myMapView
-
>InsertMapLayer(

mapLayer, name, index);


Methods in C++

-

(UIView<AGSLayerView>*)




insertMapLayer: (AGSLayer*) mapLayer




withName: (NSString*) name




atIndex: (NSUInteger) index;


result = [myMapView insertMapLayer: mapLayer


withName: name atIndex: index];

Methods in Objective C

6. Fully
-
stocked
Liquor
Cabinet

Priceless

[object message];

[object message: argument];

CGColorRef color =


[[UIColor darkGrayColor] CGColor];





CGContextSetShadowWithColor(context,


offset, 2.0, color);



spulch.blogspot.com/2007/05/weird
-
animals
-
created
-
using
-
photoshop.html

iOS Development

Memory Management

Model View Controller

Delegates

Program Structure

Memory
Management

iOS Uses Reference
Counting

alloc

creates object with count of 1

retain

increments count

release

decrements count

dealloc

called when count drops to 0

Advantage

Fast and responsive

Disadvantage

It’s hard

malloc( )


free( )

Model

View

Controller

Quick Demo

Model

View

Controller

Models

Strings

Map data (not
display)


@”Hello, World”

Views

“Window”

Views
are
Defined
in XIB
files

Controllers

EsriMapViewController controls

the view that draws this map

GoogleMapViewController controls

the view that draws this map

TabBarViewController swaps out other controllers,

whose views fill this space

Delegates

Delegate = Callback

Application Delegate

Root object of an iOS application

Responds to application events

didFinishLaunchingWithOptions

applicationWillTerminate

etc.

AGSMapViewTouchDelegate

Map view sends messages to the

view controller

didClickAtPoint

didTapAndHoldAtPoint

Structure of the
iStarted Application

Why Bother?

Learn new and

different

technologies

Business opportunity

Fun!

One More Thing

One More Thing

// UX designers

// QA engineers

// Product owners

// Developers

if ( [you want: aJob] ) {


[me contact];

}

[you Thanks];





rich.ruh@gmail.com

@richruh



[self drink: aMargarita];