44
iOS Apps in Swift Nuno Dias Developer Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

iOS apps in Swift

Embed Size (px)

Citation preview

iOS Apps in SwiftNuno Dias Developer

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

The Pleiadians

“You have accepted a thousand years of definition from those you consider authorities because they happen to speak louder

or publish books or gather degrees. That is nonsense.”

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Skills

0

25

50

75

10094%

3%1%2%

Social Public Speaking iOS Sleeping

Some apps I’ve done…

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Work Clock

CREDIBERIA - Properties & Mortgage Lending

News

4s Vendor

4s Vendor 2.0

4s Loan

Disaster Recovery

The Talk• Tools of the trade• Rules? of engagement• Debugging• Resources

Tools of The Trade• Mac with OS X• Developer Account• Swift• Xcode• Device

Tools of The Trade• Mac with OS X• Developer account• Swift• Xcode• Device

• iPhone• iPad• Apple Watch (watchOS)• Apple TV (tvOS)

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Rules? of engagement• The application life cycle

• Not Running• Inactive• Active• Background• Suspended

State changes in an iOS application life cycle

Not running

Foreground

Inactive

Active

Background

Suspended

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Rules? of engagement• Design Patterns

• Model View Controller (MVC)

MVC Design Pattern in iOS & OS X

ViewController

User Action

Model

Update

Notify Update

CompositeMediatorObserver

Whoa!Time out…

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Rules? of engagement• View Controllers

• Update the view• Respond to user interactions• Manage the layout

• Navigation Controllers

The views of a Navigation Controller …from Apple’s documentation on the UINavigationController class

Rules? of engagement• Design Patterns

• MVC• Delegation

Delegation Design Pattern in iOS & OS X

To delegate [verb], is to:“entrust (a task or responsibility)”

Protocol Declaration

ProtocolImplementation

Delegation Design Pattern in iOS & OS X

What to do

Object Object

Take responsibility

Delegate

Do it

Table View Delegate Protocol

Table View DelegateImplementation

Delegation Design Pattern in iOS & OS X

What to do

Controller Table View

Assign a reference of “self”

Code // did select row at index

did select row at index

Delegate

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Rules? of engagement• Design Patterns

• MVC• Delegation• Target-Action• Observer• Lazy Initialisation• Singleton• Prototype• Decorator• Introspection• …

Rules? of engagement• Storyboards

• Scenes• Segues• References

“MyTodo” app storyboard

Contains

NavigationController

Table ViewController

Shows

ViewController

An iOS application storyboard

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Debugging with Xcode• Stack Trace• Breakpoints• Instruments

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Resources• From an idea to a prototype

• User Interface• User Experience• Usability

• Invision App• Prototyping made Easy!• Amazing Newsletter

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Resources• Developer Library

• News & Updates• Current & Pre-Release Software (iOS, OS X, watchOS, tvOS)• Swift Blog• WWDC Videos & Sample Code• Developer Forums

• Technical Support

developer.apple.com

DemoNuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015

Resources• iBooks

• iOS Human Interface Guidelines• The Swift Programming Language• Using Swift with Cocoa and Objective-C

Available on the iBooks Store

• Developing iOS 8 Apps with Swift• Classroom Videos (With awesome picture and Clarity)• Instructor’s notes• Assignments

Resources

• Introduction to iOS, Xcode 6 and Swift• More Xcode and Swift; MVC• Using MVC in iOS• Swift and Foundation• Views• Protocols and delegation; Gestures• Multiple MVCs• View Controller Life Cycle; Autolayout• Scroll View; Multithreading

Available on iTunes (Paul Hegarty @ Stanford University)

• Table View• Unwind Segues; Alerts; Timers; View Animation• Dynamic Animation• Application Life Cycle; Core Motion• Core Location & MapKit• Modal Segues; Popovers; Notifications; Visual Effects• Camera; Persistence; Embed Segues• Internationalisation; Settings

Resources• More tools

• NSHipster nshipster.com (blog)• Natasha the Robot natashatherobot.com (blog)• Github github.com (Repository)• Sketch sketchapp.com (Prototyping)• Graphic River graphicriver.net (UI Templates)• Invision invisionapp.com (Prototyping)• Cocoa pods cocoapods.com (Library Dependency Manager)• Crashlytics crashlytics.com (Crash Reports)• Alamofire alamofire.org (Networking)

?Questions

Thanks!Nuno Dias // [email protected]

Smart Talk @ ISCTE-IUL ACM Student Chapter on October 2015