Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Size: px
Start display at page:

Download "Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar"

Transcription

1 Design Patterns MSc in Computer Science Produced by Eamonn de Leastar Department of Computing, Maths & Physics Waterford Institute of Technology

2 Todo App

3 developer.apple.com Start Developing ios Apps Today Objective-C only

4

5

6 ToDoList Applications 8 source files 5 source files

7 AppDelegate #import AppDelegate : UIResponder (strong, nonatomic) UIWindow *window; import class AppDelegate: UIResponder, UIApplicationDelegate var window: UIWindow? #import AppDelegate - (BOOL)application:(UIApplication *)application - didfinishlaunchingwithoptions:(nsdictionary *)launchoptions return YES; - (void)applicationwillresignactive:(uiapplication *)application - (void)applicationdidenterbackground:(uiapplication *)application - (void)applicationwillenterforeground:(uiapplication *)application - (void)applicationdidbecomeactive:(uiapplication *)application - (void)applicationwillterminate:(uiapplication *)application func application(application: UIApplication, didfinishlaunchingwithoptions: NSDictionary?) -> Boo return true func applicationwillresignactive(application: UIApplication) func applicationdidenterbackground(application: UIApplication) func applicationwillenterforeground(application: UIApplication) func applicationdidbecomeactive(application: UIApplication) func applicationwillterminate(application: UIApplication)

8 #import XYZToDoItem : NSObject NSString BOOL completed; The Model #import XYZToDoItem - (id)init self = [super init]; if (self) _completed = NO; return self; - (id)initwithcoder:(nscoder *)coder self = [super init]; if (self) _itemname = [coder decodeobjectforkey:@"itemname"]; _completed = [coder decodeboolforkey:@"completed"]; class ToDoItem var completed = false var itemname = "" init(completed: Bool = false, itemname:string = "empty") self.completed = completed self.itemname = itemname return self; - (void)encodewithcoder:(nscoder *)coder [coder encodeobject:self.itemname forkey:@"itemname"]; [coder encodebool:self.completed forkey:@"completed"];

9 #import <UIKit/UIKit.h> #import XYZAddToDoItemViewController : XYZToDoItem *todoitem; ToDoItemController #import XYZAddToDoItemViewController (weak, nonatomic) IBOutlet UITextField (weak, nonatomic) IBOutlet UIBarButtonItem XYZAddToDoItemViewController - (void) prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender if (sender = self.donebutton) return; if (self.textfield.text.length > 0) self.todoitem = [[XYZToDoItem alloc] init]; self.todoitem.itemname = self.textfield.text; - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) return self; - (void)viewdidload [super viewdidload]; - (void)didreceivememorywarning [super didreceivememorywarning];

10 ToDoItemController import UIKit class AddToDoItemViewController: UIViewController var todoitem : var todoitemtext : var donebutton : UIButton init(nibname nibnameornil: String?, bundle nibbundleornil: NSBundle?) super.init(nibname: nibnameornil, bundle: nibbundleornil) override func prepareforsegue(segue: UIStoryboardSegue, sender: AnyObject) if let button = sender as? NSObject todoitem = button == donebutton? ToDoItem(itemName:toDoItemText.text): nil init(coder adecoder: NSCoder) super.init(coder: adecoder)

11 #import XYZToDoListViewController : NSMutableArray *todoitems; ToDoListTableConroller #import "XYZToDoListViewController.h" #import "XYZToDoItem.h" #import "XYZAddToDoItemViewController.h" - XYZToDoListViewController () self = [super NSString *path; if (self) - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section return XYZToDoListViewController return [self.todoitems count]; - (void)savelist - (void)viewdidload [NSKeyedArchiver archiverootobject:self.todoitems [super viewdidload]; tofile:self.path]; - (void)didreceivememorywarning return cell; - (IBAction)unwindToList:(UIStoryboardSegue [super didreceivememorywarning]; *)segue - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpat self.path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, static NSString *CellIdentifier - (void)tableview:(uitableview *)tableview commiteditingstyle:(uitableview NSUserDomainMask, YES) lastobject]; - (void)loadinitialdata self.path = [self.path UITableViewCell stringbyappendingpathcomponent:@"todolist.txt"]; *cell = [tableview *)indexpath dequeuereusablecellwithidentifier:cellidentifier forindexpath:in XYZToDoItem *item1 NSFileManager = [[XYZToDoItem *filemanager XYZToDoItem alloc] init]; = [NSFileManager *todoitem defaultmanager]; = [self.todoitems if (editingstyle objectatindex:indexpath.row]; == UITableViewCellEditingStyleDelete) item1.itemname if ([filemanager milk"; fileexistsatpath:self.path]) cell.textlabel.text = todoitem.itemname; [self.todoitems removeobjectatindex:indexpath.row]; [self.todoitems addobject:item1]; self.todoitems = [[NSMutableArray if (todoitem.completed) [self savelist]; alloc] init]; XYZToDoItem *item2 = [[XYZToDoItem alloc] init]; item2.itemname else cell.accessorytype = UITableViewCellAccessoryCheckmark; [tableview deleterowsatindexpaths:@[indexpath] withrowanimation:uitabl eggs"; [self.todoitems addobject:item2]; self.todoitems = [[NSKeyedUnarchiver else else if (editingstyle == UITableViewCellEditingStyleInsert) unarchiveobjectwithfile:self.path] mutablecopy]; XYZToDoItem *item3 = [[XYZToDoItem alloc] init]; cell.accessorytype = UITableViewCellAccessoryNone; item3.itemname self.navigationitem.leftbarbuttonitem a book"; = self.editbuttonitem; [self.todoitems addobject:item3]; - (void)tableview:(uitableview *)tableview moverowatindexpath:(nsindexpath - (BOOL)tableView:(UITableView - (BOOL)tableView:(UITableView *)tableview caneditrowatindexpath:(nsindexpath *)tableview canmoverowatindexpath:(nsindexp *)indexpath XYZAddToDoItemViewController *source = [segue sourceviewcontroller]; XYZToDoItem *item #pragma = source.todoitem; mark - Table view data source if (item = nil) return YES; return YES; - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview [self.todoitems addobject:item]; [self savelist]; return 1; - (void)tableview:(uitableview *)tableview commiteditingstyle:(uitableviewcelleditingstyle)editingsty [self.tableview *)indexpath #pragma mark - Navigation reloaddata]; - (NSInteger)tableView:(UITableView if (editingstyle *)tableview == UITableViewCellEditingStyleDelete) numberofrowsinsection:(nsinteger)section - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsinde return [self.todoitems count]; [self.todoitems removeobjectatindex:indexpath.row]; [self savelist]; [tableview deselectrowatindexpath:indexpath animated:no];

12 import class ToDoListTableViewController: UITableViewController var todoitems = ToDoItem[]() init(style: UITableViewStyle) super.init(style: style) init(coder adecoder: NSCoder) super.init(coder: adecoder) override func tableview(tableview: UITableView, didselectrowatindexpath : NSIndexPath) tableview.deselectrowatindexpath(didselectrowatindexpath, animated: false) var task = self.todoitems[didselectrowatindexpath.row] as ToDoItem task.completed = task.completed tableview.reloadrowsatindexpaths([didselectrowatindexpath], withrowanimation: UITableVie override func tableview(tableview: UITableView?, cellforrowatindexpath : NSIndexPath) -> let cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseidentifie func loadinitialdata() var task = todoitems[cellforrowatindexpath.row] todoitems.append(todoitem(itemname:"buy Milk", cell.text completed:false)) = task.itemname todoitems.append(todoitem(itemname:"buy eggs", cell.accessorytype completed:false)) = task.completed? UITableViewCellAccessoryType.Checkmark : UITableVi todoitems.append(todoitem(itemname:"read a book", completed:false)) return cell override func viewdidload() super.viewdidload() loadinitialdata() override func tableview(tableview: UITableView?, caneditrowatindexpath : NSIndexPath?) -> return true navigationitem.leftbarbuttonitem = self.editbuttonitem() override func unwindtolist (segue: UIStoryboardSegue?) if commiteditingstyle ==.Delete var controller = segue?.sourceviewcontroller as AddToDoItemViewController if controller.todoitem = nil if let index = forrowatindexpath?.row todoitems.append(controller.todoitem) todoitems.removeatindex(index) self.tableview.reloaddata() tableview?.deleterowsatindexpaths([forrowatindexpath], withrowanimation:.fade) else if commiteditingstyle ==.Insert override func numberofsectionsintableview(tableview: UITableView?) -> Int return 1 override func tableview(tableview: UITableView?, moverowatindexpath : NSIndexPath?, toinde override func tableview(tableview: UITableView?, numberofrowsinsection: Int) -> Int return todoitems.count ToDoListTableConroller override func tableview(tableview: UITableView?, canmoverowatindexpath : NSIndexPath?) -> return true

13 KLocs Objctive-C Swift AppDelegate.h 7 AppDelegate.m 30 AppDelegate.swift 33 ToDoItem.h 8 ToDoItem.m 33 ToDoItem.swift 12 ToDoItemController.h 8 ToDoItemController.m 41 ToDoItemController.swift 27 ToDiListController.h 7 ToDiListController.m 156 ToDoListController.swift

14 Except where otherwise noted, this content is licensed under a Creative Commons Attribution-NonCommercial 3.0 License. For more information, please see creativecommons.org/licenses/by-nc/3.0/

Document Version Date: 1st March, 2015

Document Version Date: 1st March, 2015 7 Minute Fitness: ios(swift) Application Document Version 1.0.1 Date: 1st March, 2015 2 [7 MINUTE FITNESS: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance

More information

imate: ios Application

imate: ios Application imate: ios Application Document Version 1.0.1 Date: 27 th May, 2014 2 [IMATE: IOS APPLICATION] Contents AppDelegate Class Reference... 4 Tasks... 4 Properties... 4 Instance Methods... 4 ChatMenuViewController

More information

News- ipad: ios(swift) Application

News- ipad: ios(swift) Application News- ipad: ios(swift) Application Document Version 1.0.1 Date: 9 th Nov, 2014 2 [NEWS- IPAD: APP DOCUMENTATION] Important Notes:... 6 AppDelegate Class Reference... 7 Tasks... 7 Instance Methods... 7

More information

Social Pinboard: ios(swift) Application

Social Pinboard: ios(swift) Application Social Pinboard: ios(swift) Application Document Version 1.0.1 Date: 15 th May, 2015 2 [SOCIAL PINBOARD: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance Methods...

More information

ITP 342 Mobile App Dev. Table Views

ITP 342 Mobile App Dev. Table Views ITP 342 Mobile App Dev Table Views Table Views The most common mechanism used to display lists of data to the user Highly configurable objects that can be made to look practically any way you want them

More information

Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project

Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project Choose the Single View Application template Click Next. In the Choose options for your new

More information

CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson

CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson 1 Team Members:! 3 Project Description:! 3 Project Goals:! 3 Research/Design:! 3 Web Service

More information

src3/bettertextfield/bettertextfield/appdelegate.h // AppDelegate.h // BetterTextField

src3/bettertextfield/bettertextfield/appdelegate.h // AppDelegate.h // BetterTextField src3/bettertextfield/bettertextfield/appdelegate.h 1 1 1 1 AppDelegate.h BetterTextField Created by Tommy MacWilliam on 3/7/ Copyright (c) 2012 MyCompanyName. All rights reserved. #import

More information

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Tables Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Table View Controller Table View Table Cells

More information

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView Chapter 22 TableView TableView Android TableView ListView App 22.1 TableView TableView Storyboard Table View ViewController TableView ios Cell TableViewCell TableView Table View Cell Cell ImageView (imageview)

More information

App. Chapter 19 App. App (ViewController) App. Single View Application Single View Application View. (View Controller)

App. Chapter 19 App. App (ViewController) App. Single View Application Single View Application View. (View Controller) Chapter 19 App App (ViewController) App 19.1 App App Single View Application Single View Application View Controller View Controller Label Button Button (View Controller) 2 View Controller Utility Area

More information

Apple Development Technology Workshops

Apple Development Technology Workshops Apple Development Technology Workshops Workshop 10 Table Views Building iphone Apps. Pt 2 Fall 2008 Hafez Rouzati Fall 2008 Zach Pousman Last Week UIViewControllers Organizing Content & Building iphone

More information

Praktikum Entwicklung von Mediensystemen mit

Praktikum Entwicklung von Mediensystemen mit Praktikum Entwicklung von Mediensystemen mit Wintersemester 2013/2014 Christian Weiß, Dr. Alexander De Luca Today Table View Navigation Controller Passing Data Between Scenes Assignment 2 2 Navigation-based

More information

Naviga&on and Tab Bar Controllers and Table View

Naviga&on and Tab Bar Controllers and Table View Naviga&on and Tab Bar Controllers and Table View UINaviga)onController Stack of view controllers Naviga)on bar How It Fits Together Top view controller s view Top view controller s )tle Previous view controller

More information

Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior

Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior Today s Topics Scroll views Table views Displaying data Controlling appearance & behavior UITableViewController Table view cells Scroll Views UIScrollView For displaying more content than can fit on the

More information

IPHONE DEVELOPMENT. Getting Started with the iphone SDK

IPHONE DEVELOPMENT. Getting Started with the iphone SDK IPHONE DEVELOPMENT Getting Started with the iphone SDK OBJECTIVE-C The Big Picture STRICT SUPERSET OF C The Objective C Language Any C stuff applies Standard libs are here (time, sqrt etc) The C Language

More information

Data IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010

Data IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010 Data IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Today Property Lists User Defaults Settings Panels CoreData Property Lists Today Add persistence. plist 1. Using Property Lists in

More information

CS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views

CS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views CS193P - Lecture 8 iphone Application Development Scroll Views & Table Views Announcements Presence 1 due tomorrow (4/28)! Questions? Presence 2 due next Tuesday (5/5) Announcements Enrolled students who

More information

Enhancing your apps for the next dimension of touch

Enhancing your apps for the next dimension of touch App Frameworks #WWDC16 A Peek at 3D Touch Enhancing your apps for the next dimension of touch Session 228 Tyler Fox UIKit Frameworks Engineer Peter Hajas UIKit Frameworks Engineer 2016 Apple Inc. All rights

More information

COPYRIGHTED MATERIAL. part I Developing a Professional UI. Chapter 1: Creating a Personal Library. Chapter 2: Advancing with Tableviews

COPYRIGHTED MATERIAL. part I Developing a Professional UI. Chapter 1: Creating a Personal Library. Chapter 2: Advancing with Tableviews part I Developing a Professional UI Chapter 1: Creating a Personal Library Chapter 2: Advancing with Tableviews Chapter 3: Advancing with Map Kit Chapter 4: Understanding Action Views and Alerts Chapter

More information

iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin Flashlight CodeTour TouchCount CodeTour

iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin Flashlight CodeTour TouchCount CodeTour iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin 1 Legal Info iphone is a trademark of Apple Inc. Servin is a trademark of Servin Corporation 2 Welcome Welcome! Thank you! My promise

More information

ios Mobile Development

ios Mobile Development ios Mobile Development Today UITableView! Data source-driven vertical list of views.! ipad! Device-specific UI idioms.! Demo! Shutterbug UITableView Very important class for displaying data in a table!

More information

lectures/2/src2/nib1/nib1/appdelegate.h // AppDelegate.h // Nib1 // David J. Malan // Harvard University //

lectures/2/src2/nib1/nib1/appdelegate.h // AppDelegate.h // Nib1 // David J. Malan // Harvard University // lectures/2/src2/nib1/nib1/appdelegate.h 1 1 1 1 1 1 1 1 1 2 AppDelegate.h Nib1 David J. Malan Harvard University malan@harvard.edu Demonstrates a Single View Application implemented with a nib, plus IBAction

More information

Mobile Application Programing: ios. Messaging

Mobile Application Programing: ios. Messaging Mobile Application Programing: ios Messaging Application Model View Controller (MVC) Application Controller User Action Update View Notify Update Model Messaging Controller User Action Update Notify Update

More information

Building the App - Part 5 - Adding a Link

Building the App - Part 5 - Adding a Link Unit 4 - Coding For Your App Copy and Paste the code below exactly where the tutorials tell you. DO NOT COPY TEXT IN RED. Building the App - Part 5 - Adding a Link XCODE 7 @IBAction func Button1(_ sender:

More information

ITP 342 Mobile App Dev. Table Views

ITP 342 Mobile App Dev. Table Views ITP 342 Mobile App Dev Table Views Tables A table presents data as a scrolling, singlecolumn list of rows that can be divided into sections or groups. Use a table to display large or small amounts of information

More information

ios Development - Xcode IDE

ios Development - Xcode IDE ios Development - Xcode IDE To develop ios applications, you need to have an Apple device like MacBook Pro, Mac Mini, or any Apple device with OS X operating system, and the following Xcode It can be downloaded

More information

Lab #1: Chuck Norris Joke Generator Class

Lab #1: Chuck Norris Joke Generator Class Lab #1: Chuck Norris Joke Generator Class Chuck Norris does not need Twitter... he is already following you. Chuck Norris doesn t flush the toilet, he scares the sh*t out of it. Chuck Norris is the reason

More information

Life Cycle. Chapter Explore the Game Application. Understanding the Views in a Game

Life Cycle. Chapter Explore the Game Application. Understanding the Views in a Game 3 Chapter Explore the Game Application Life Cycle There is more to a game than just the fun parts. Almost all of the games on the market, and definitely the big titles, involve multiple views and a reasonably

More information

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015 Stanford CS193p Developing Applications for ios Today UITextField Bonus Topic! Table View A UIView for displaying long lists or tables of data UITextField Like UILabel, but editable Typing things in on

More information

Your First ios 7 App. Everything you need to know to build and submit your first ios app. Ash Furrow

Your First ios 7 App. Everything you need to know to build and submit your first ios app. Ash Furrow Your First ios 7 App Everything you need to know to build and submit your first ios app. Ash Furrow This book is for sale at http://leanpub.com/your-first-ios-app This version was published on 2014-09-13

More information

Persistence. CS 442: Mobile App Development Michael Saelee

Persistence. CS 442: Mobile App Development Michael Saelee Persistence CS 442: Mobile App Development Michael Saelee Things to persist - Application settings - Application state - Model data - Model relationships Persistence options - User defaults

More information

AVAudioPlayer. avtouch Application

AVAudioPlayer. avtouch Application AVAudioPlayer avtouch Application iphone Application Index 1. iphone Application 1) iphone Application 2) iphone Application Main Method 3) iphone Application nib(.xib) 2. avtouch Application 1) avtouch

More information

Introductory ios Development

Introductory ios Development Introductory ios Development 152-164 Unit 5 - Multi-View Apps Quick Links & Text References What is a Delegate? What is a Protocol? Delegates, Protocols and TableViews Creating a Master-Detail App Modifying

More information

Protocols and Delegates. Dr. Sarah Abraham

Protocols and Delegates. Dr. Sarah Abraham Protocols and Delegates Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 Protocols Group of related properties and methods that can be implemented by any class Independent of any class

More information

Monetize and Promote Your App with iad

Monetize and Promote Your App with iad Media #WWDC15 Monetize and Promote Your App with iad From design to launch Session 503 Carol Teng Shashank Phadke 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

COMP327 Mobile Computing Session: Lecture Set 1a - Swift Introduction and the Foundation Framework Part 2

COMP327 Mobile Computing Session: Lecture Set 1a - Swift Introduction and the Foundation Framework Part 2 COMP327 Mobile Computing Session: 2018-2019 Lecture Set 1a - Swift Introduction and the Foundation Framework Part 2 73 Other Swift Guard Already seen that for optionals it may be necessary to test that

More information

Collection Views. Dr. Sarah Abraham

Collection Views. Dr. Sarah Abraham Collection Views Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 What is a Collection View? Presents an ordered set of data items in a flexible layout Subclass of UIScrollView (like UITableView)

More information

Cocoa Touch Best Practices

Cocoa Touch Best Practices App Frameworks #WWDC15 Cocoa Touch Best Practices Session 231 Luke Hiesterman UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Data Storage. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder

Data Storage. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Data Storage Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Already seen UserDefaults icloud File

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer About the Tutorial ios is a mobile operating system developed and distributed by Apple Inc. It was originally released in 2007 for the iphone, ipod Touch, and Apple TV. ios is derived from OS X, with which

More information

From Hello World to Finished App. raywenderlich.com

From Hello World to Finished App. raywenderlich.com From Hello World to Finished App Why Learn ios? - Strong demand - Motivating - App Store - It s fun! What s This All About? - One Day Crash Course - For beginners & intermediates - Making apps with UIKit

More information

ios Core Data Example Application

ios Core Data Example Application ios Core Data Example Application The Core Data framework provides an abstract, object oriented interface to database storage within ios applications. This does not require extensive knowledge of database

More information

Praktikum Entwicklung von Mediensystemen mit ios

Praktikum Entwicklung von Mediensystemen mit ios Praktikum Entwicklung von Mediensystemen mit ios WS 2011 Prof. Dr. Michael Rohs michael.rohs@ifi.lmu.de MHCI Lab, LMU München Today Storyboards Automatic Reference Counting Animations Exercise 3 2 Timeline

More information

InterfaceBuilder and user interfaces

InterfaceBuilder and user interfaces ES3 Lab 2 InterfaceBuilder and user interfaces This lab InterfaceBuilder Creating components Linking them to your code Adding buttons, labels, sliders UITableView Creating a tableview Customizing cells

More information

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall Stanford Developing Applications for ios Today Drag and Drop Transferring information around within and between apps. EmojiArt Demo Drag and drop an image to get our EmojiArt masterpieces started. UITableView

More information

lecture 10 UI/UX and Programmatic Design cs : spring 2018

lecture 10 UI/UX and Programmatic Design cs : spring 2018 lecture 10 UI/UX and Programmatic Design cs198-001 : spring 2018 1 Announcements custom app progress form due before lab (~1 minute) will be released after lecture only 2 labs left (both very important)

More information

Mobile Application Programming. Controls

Mobile Application Programming. Controls Mobile Application Programming Controls Views UIView instances and subclasses Form a tree rooted at the window Have a backing store of pixels that are drawn seldomly, then composited to form the full user

More information

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011 Developing Applications for ios Today Persistence How to make things stick around between launchings of your app (besides NSUserDefaults) Persistence Property Lists Use writetourl:atomically: and initwithcontentsofurl:

More information

SDK Quick Start Guide

SDK Quick Start Guide SDK Quick Start Guide Index Requirements...3 Required Frameworks...3 Project Target Build Settings...4 AppDelegate sub- classing...4 Using the Low Level API...6 C2CallPhone Base class for low- level C2Call

More information

Core Data. CS 442: Mobile App Development Michael Saelee

Core Data. CS 442: Mobile App Development Michael Saelee Core Data CS 442: Mobile App Development Michael Saelee persistence framework (not just an ORM, as non-relational backends are supported) CD tracks an object graph (possibly disjoint), and

More information

Lab #1: Chuck Norris Joke Generator Class

Lab #1: Chuck Norris Joke Generator Class Lab #1: Chuck Norris Joke Generator Class Chuck Norris does not need Twitter... he is already following you. Chuck Norris doesnʼt flush the toilet, he scares the sh*t out of it. Chuck Norris is the reason

More information

IOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib

IOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib IOS - TEXT FIELD http://www.tutorialspoint.com/ios/ios_ui_elements_text_field.htm Copyright tutorialspoint.com Use of Text Field A text field is a UI element that enables the app to get user input. A UITextfield

More information

Detailed Design Specification

Detailed Design Specification Department of Computer Science and Engineering the University of Texas at Arlington Detailed Design Specification BehindtheCurtain Enterprises Project Team Members: Kyle Burgess Kyle Crumpton Austen Herbst

More information

Implementing UI Designs in Interface Builder

Implementing UI Designs in Interface Builder Developer Tools #WWDC15 Implementing UI Designs in Interface Builder Session 407 Kevin Cathey Interface Builder Engineer Tony Ricciardi Interface Builder Engineer 2015 Apple Inc. All rights reserved. Redistribution

More information

Files & Archiving. Lecture 8

Files & Archiving. Lecture 8 Files & Archiving Lecture 8 Persistent Data NSUserDefaults Dead simple to use Just one big file Only supports property list types What if you want more features? File Tasks Finding the file path User selected

More information

Learn to make ios apps

Learn to make ios apps HACKING WITH SWIFT PROJECTS 1-39 Learn to make ios apps E L P with real projects SAM E E FR Paul Hudson Project 1 Storm Viewer Get started coding in Swift by making an image viewer app and learning key

More information

Building GUIs with UIKit. Kevin Cathey

Building GUIs with UIKit. Kevin Cathey Building GUIs with UIKit Kevin Cathey Building GUIs with UIKit acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What is UIKit? acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What

More information

Designing iphone Applications

Designing iphone Applications Designing iphone Applications 4 Two Flavors of Mail 5 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content Focus on your user s data 6 Organizing Content

More information

Notifications. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder

Notifications. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Notifications Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Alerts Internal notifications Local

More information

Multitasking and Background Execution

Multitasking and Background Execution Multitasking and Background Execution Fall, 2012 Prof. Massimiliano "Max" Pala pala@nyu.edu Introduction Spawning Threads and Tasks Background Execution User hits 'home' button the app is sent in the background

More information

Review. Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management

Review. Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management Data Persistence Review Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management Foundation NSArray, NSDictionary, NSString (and mutable versions thereof) MVC and UIViewController

More information

Navigation and Segues

Navigation and Segues Navigation and Segues Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Multiple views Segues Navigation

More information

Learning ios 8 for Enterprise

Learning ios 8 for Enterprise Learning ios 8 for Enterprise Design and develop stunning ios applications for business environments Mayank Birani BIRMINGHAM - MUMBAI Learning ios 8 for Enterprise Copyright 2014 Packt Publishing All

More information

COSC$4355/6355$ $Introduction$to$Ubiquitous$Computing$ Exercise$3$ September!17,!2015!

COSC$4355/6355$ $Introduction$to$Ubiquitous$Computing$ Exercise$3$ September!17,!2015! COSC4355/6355 IntroductiontoUbiquitousComputing Exercise3 September17,2015 Objective Inthisexercise,youwilllearnhowtowriteunittestsforyourapplicationandalsohowtouse NSUserDefaults.WewillalsoimplementObjectiveCCcategories*welearntlastweek.

More information

View Controllers CPRE 388

View Controllers CPRE 388 View Controllers CPRE 388 View Controllers Manage views in model view controller design template. Many types: custom view controller; container view controller; modal view controller. Custom View controllers

More information

Deploying a Signed ios Application to the Enterprise using Oracle Business Intelligence Mobile Security Toolkit

Deploying a Signed ios Application to the Enterprise using Oracle Business Intelligence Mobile Security Toolkit Oracle Fusion Middleware Deploying a Signed ios Application to the Enterprise using Oracle Business Intelligence Mobile SecurityToolkit 12c Release 1 E92654-01 February 2018 Deploying a Signed ios Application

More information

UI Design and Storyboarding

UI Design and Storyboarding UI Design and Storyboarding Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Model-View-Controller

More information

Developing Applications for ios

Developing Applications for ios Developing Applications for ios Lecture 10: Managing and Storing Data Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Content Property Lists Archiving

More information

This book contains code samples available under the MIT License, printed below:

This book contains code samples available under the MIT License, printed below: Bluetooth Low Energy in ios Swift by Tony Gaitatzis Copyright 2015 All Rights Reserved All rights reserved. This book or any portion thereof may not be reproduced or used in any manner whatsoever without

More information

Computer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers

Computer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers Computer Science 251 iphone Application Development Autorotation, Popover Controllers, Modal Controllers Two Types of Orientation Device: physically upside down, rotated left, on its back, etc. Can be

More information

[ 핵심만골라배우는 ios 8 프로그래밍 ] 코드수정사항

[ 핵심만골라배우는 ios 8 프로그래밍 ] 코드수정사항 [ 핵심만골라배우는 ios 8 프로그래밍 ] 코드수정사항 작성자 : 황반석 작성일 : 20150417 아래는 ios 83 업데이트로인해책의코드에서수정해야할부분을정리한것들입니다 수정해야할 부분은붉은색으로표기해두었으며, ios 83 에맞춰테스트한책소스전체는아래의링크에서받으실 수있습니다 ( 아래편집본은코드들여쓰기가무시된상태임을알려드립니다 ) 소스코드다운로드 : https://githubcom/jpub/ios8

More information

} override func didreceivememorywarning() { 26 super.didreceivememorywarning() 27 } 28 } Pause Stop

} override func didreceivememorywarning() { 26 super.didreceivememorywarning() 27 } 28 } Pause Stop Chapter 30 30.1 App App MP3 Don t Download This Song [1] Finder MP3 Xcode UI 1 import UIKit 2 import AVFoundation 3 4 class ViewController: UIViewController { 5 6 var player: AVAudioPlayer? 7 8 override

More information

MVC and Interface Builder IAP 2010

MVC and Interface Builder IAP 2010 MVC and Interface Builder IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Information-Driven Applications Application Flow UIApplication Main NIB Initialized UIAppDelegate - (void)applicationdidfinishlaunching:(uiapplication

More information

Objective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008

Objective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008 Objective-C Primer iphone Programmer s Association Lorenzo Swank September 10, 2008 Disclaimer Content was blatantly and unapologetically stolen from the WWDC 2007 Fundamentals of Cocoa session, as well

More information

COMP327 Mobile Computing Session: Lecture Set 4 - Data Persistence, Core Data and Concurrency

COMP327 Mobile Computing Session: Lecture Set 4 - Data Persistence, Core Data and Concurrency COMP327 Mobile Computing Session: 2012-2013 Lecture Set 4 - Data Persistence, Core Data and Concurrency 1 In these Slides... We will cover... An introduction to Local Data Storage The iphone directory

More information

AVAudioRecorder & System Sound Services

AVAudioRecorder & System Sound Services AVAudioRecorder & System Sound Services Dept. of Multimedia Science, Sookmyung Women s University. prof. JongWoo Lee Index AVAudioRecorder? - (AudioRecorder) System Sound Service? - (SysSound) AVAudioRecorder

More information

ITP 342 Mobile App Dev. Connections

ITP 342 Mobile App Dev. Connections ITP 342 Mobile App Dev Connections User Interface Interactions First project displayed information to the user, but there was no interaction. We want the users of our app to touch UI components such as

More information

OVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net

OVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net OVERVIEW Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net Microsoft MVP for 4 years C#, WinForms, WPF, Silverlight Joined Cynergy about

More information

Your First iphone OS Application

Your First iphone OS Application Your First iphone OS Application General 2010-03-15 Apple Inc. 2010 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form

More information

iphone Application Tutorial

iphone Application Tutorial iphone Application Tutorial 2008-06-09 Apple Inc. 2008 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any

More information

COMPLETE TUTORIAL COURSE. Learn to make tvos LE. apps with real-worldam S F

COMPLETE TUTORIAL COURSE. Learn to make tvos LE. apps with real-worldam S F HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make tvos LE P apps with real-worldam S Swift projects REEPaul Hudson F Project 1 Randomly Beautiful 2 www.hackingwithswift.com Setting up In this first

More information

epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE

epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE + = Prototype iphone ipad Why iphone apps Simplicity Control Speed Revenue Epicurious Defined as a Recipe Utility Cookbook

More information

Phone. Making a phone call within app ( and returning to app after call ends ) is as easy as :

Phone. Making a phone call within app ( and returning to app after call ends ) is as easy as : Phone Making a phone call within app ( and returning to app after call ends ) is as easy as : -(void)makecall { UIApplication *application = [UIApplication sharedapplication]; NSURL *URL = [NSURL URLWithString:

More information

A Mad Libs app that you will navigate through 3 UIViewControllers to add text that will be shown in a story on the fourth UIViewController.

A Mad Libs app that you will navigate through 3 UIViewControllers to add text that will be shown in a story on the fourth UIViewController. WordPlay App: A Mad Libs app that you will navigate through 3 UIViewControllers to add text that will be shown in a story on the fourth UIViewController. Create a new project Create a new Xcode project

More information

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011 Developing Applications for ios Today UI Element of the Week UIToolbar ipad Split View Popover Universal (iphone + ipad) Application Demo Friday Section AVFoundation framework - Capturing and manipulating

More information

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer App Frameworks #WWDC16 What s New in tvos Session 206 Hans Kim tvos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Welcome

More information

ITP 342 Mobile App Dev. Connections

ITP 342 Mobile App Dev. Connections ITP 342 Mobile App Dev Connections User Interface Interactions First project displayed information to the user, but there was no interaction. We want the users of our app to touch UI components such as

More information

App Extension Best Practices

App Extension Best Practices App Frameworks #WWDC15 App Extension Best Practices Session 224 Sophia Teutschler UIKit Engineer Ian Baird CoreOS Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

ITP 342 Mobile App Dev. Delegates

ITP 342 Mobile App Dev. Delegates ITP 342 Mobile App Dev Delegates Protocol A protocol is a declaration of a list of methods Classes that conform to the protocol implement those methods A protocol can declare two kinds of methods: required

More information

Step 1: Open Xcode and select Create a new Xcode Project from the Welcome to Xcode menu.

Step 1: Open Xcode and select Create a new Xcode Project from the Welcome to Xcode menu. In this tutorial we are going to build a simple calculator using buttons that are all linked together using the same method. We will also add our own method to the source code to create some additional

More information

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010 Developing Applications for iphone 4, ipod Touch, & ipad Today More Core Data What does the code for the custom NSManagedObject subclasses generated by Xcode look like? Querying for (fetching) objects

More information

Your First iphone Application

Your First iphone Application Your First iphone Application General 2009-01-06 Apple Inc. 2009 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form

More information

Q-1 What is Parsing? Explain XML parsing and JSON parsing with example. OR Explain JSON parsing with example.

Q-1 What is Parsing? Explain XML parsing and JSON parsing with example. OR Explain JSON parsing with example. Q-1 What is Parsing? Explain XML parsing and JSON parsing with example. OR Explain JSON parsing with example. Parsing defined as separation. To separate the sentence into grammatical meaning or words,

More information

1.1 Why Foxit Mobile PDF SDK is your choice Foxit Mobile PDF SDK Key features Evaluation...

1.1 Why Foxit Mobile PDF SDK is your choice Foxit Mobile PDF SDK Key features Evaluation... TABLE OF CONTENTS 1 Introduction to...2 1.1 Why is your choice... 2 1.2... 3 1.3 Key features... 4 1.4 Evaluation... 4 1.5 License... 5 1.6 About this Guide... 5 2 Getting Started...6 2.1 Requirements...

More information

ITP 342 Mobile App Dev. Web View

ITP 342 Mobile App Dev. Web View ITP 342 Mobile App Dev Web View Web View 2 WebKit The WebKit provides a set of core classes to display web content in windows, and by default, implements features such as following links clicked by the

More information

Mobile Apps 2010 iphone and Android

Mobile Apps 2010 iphone and Android Mobile Apps 2010 iphone and Android March 9, 2010 Norman McEntire, Founder Servin Corporation - http://servin.com Technology Training for Technology ProfessionalsTM norman.mcentire@servin.com 1 Legal Info

More information

An introduction to Swift. Sasha

An introduction to Swift. Sasha An introduction to Swift Sasha Goldshtein @goldshtn Exhibit A + (NSUInteger)indexOfString:(NSString *)str inarray:(nsarray *)arr { return [arr indexofobject:str]; // 1) if 'str' is nil, we return NSNotFound

More information

Rx in the real world. 1 Rob Ciolli

Rx in the real world. 1 Rob Ciolli Rx in the real world 1 Rob Ciolli 2 Rob Ciolli 3 Rob Ciolli The App 4 Rob Ciolli Quick architecture overview 5 Rob Ciolli MV - WTF 6 Rob Ciolli Model Simple, immutable data struct returned from DB or APIs

More information

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content View Concepts iphone Application Programming Lecture 4: User Interface Design SDK provide many types of Views to show your content At run-time Views are organized as a tree Chat Wacharamanotham Media Computing

More information