CSC 581: Mobile App Development
Spring 2019
Course Overview
- To apply existing programming skills to the mobile domain, addressing challenges such as memory restrictions, touch-based interfaces, and rapidly evolving architectures.
- To appreciate the wide range of tools and platforms available for mobile development, and be able to identify appropriate tools for various tasks.
- To be proficient with the XCode development environment and the Swift programming language.
- To design and implement apps that address real-world needs, using best practices in design and software engineering.
Mobile landscape
iOS background
iOS history, market share, profits vs. volume
iOS architecture: Cocoa Touch, media layer, core services, core OS
mobile platforms
Web vs. native vs. hybrid apps
Progressive Web Apps, hybrid technologies: PhoneGap, React Native, ...
iOS vs. Android
mobile design guidelines
iOS design themes: clarity, deference, depth
iOS design principles
aesthetic integrity, direct manipulation, metaphors,
consistency, feedback, user control
mobile future
AI, IoT, AR/VR, cloud, data science, security
Progressive Web apps
icon file, manifest file, service worker
PWA vs. native tradeoffs
Swift
language basics
variables: let vs. var, scope
data types: type inferencing, expressions, enumerations
optionals: ?, !, if-let
control statements: if, while, for (with ranges), guard
functions: internal vs. external names, default parameters
String: e.g. word: String
field: count; methods: lowercased, uppercased, contains, []
String interpolations: e.g., print("\(a) \(b)")
collections
array: e.g., names : [String]
field: count; methods: append, +=, remove, insert
dictionary (map): e.g., var ages : [String:Int]
fields: count, keys, values; methods: contains, remove, filter
user-defined types
struct: commonly used for data structures & objects
value type, no inheritance
public vs. private vs. private(set) fields
init method, must specify mutating methods
(note: arrays & dictionaries are structs)
class: generally used for OO programming
reference type, supports inheritance (must specify when override)
OO design
computed properties/fields
Model-View-Controller (MVC) pattern
protocols: CustomStringConvertible, Equatable, Comparable, user-defined
data persistence:
reading text from a file, Bundle.main.path
parsing the text using String.split and String.components
reading writing objects into Info.plist
UserDefaults.standard.set, UserDefaults.standard.string
Xcode/UIKit
Xcode IDE
playgrounds vs. projects
IDE areas: editor, toolbar, navigator, debug, utility
Single View App template: ViewController.swift, Main.storyboard
iOS UIKit
UIView subclasses: UILabel, UIImageView, UITextView, UITabBar, ...
UIControl subclasses: UIButton, UISwitch, UISegmentedControl, UITextField, ...
fields/properties: isHidden, isEnabled, ...
Common tasks
UI elements:
drag from Object Library, create an outlet/action
app layout:
constraints, stack views
navigation:
hierachical vs. flat vs. content-driven design
show vs. modal segues, prepare method, viewDidLoad method
navigation bar, tab bar
images:
UIImageView, app icons
specialized views:
UIPickerView, UIScrollView, UITableView, popovers
sensing:
motion events (e.g., shake), touch gestures (e.g., tap, swipe)