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

Size: px
Start display at page:

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

Transcription

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

2

3 + =

4 Prototype

5 iphone

6 ipad

7 Why iphone apps Simplicity Control Speed Revenue

8 Epicurious Defined as a Recipe Utility Cookbook + Shopping List

9 Challenges New language + framework Mobile Web Limited CPU + Memory Small screen Memory management

10 User Interface

11 Mobile What do you need on the go? Simple One core feature

12 How To Intuitive interface > Help Guides

13 Human Interface Guidelines Commonality across apps Familiarity

14 Physicality Physical metaphors pervasive Apps are fast - perception vs reality

15 Objective-C A Primer

16 File Types.h: header files.m: source files

17 Primitive Types int, long, NSInteger BOOL char float, double

18 Basic Types NSObject id NSString NSArray

19 Reviews : LoadedResource {! NSMutableArray *_reviewlist;! int _recipeid; (nonatomic, retain) NSMutableArray (nonatomic) int recipeid; -(id)initwithrecipeid:(int)recipeid; -(void)addreview:(review *)r; -(void)doneparsingreviews; -(BOOL)empty;

20 Reviews.h Class Reviews : LoadedResource {! NSMutableArray *_reviewlist;! int _recipeid; (nonatomic, retain) NSMutableArray (nonatomic) int recipeid; -(id)initwithrecipeid:(int)recipeid; -(void)addreview:(review *)r; -(void)doneparsingreviews; -(BOOL)empty;

21 Reviews.h Parent Class Reviews : LoadedResource {! NSMutableArray *_reviewlist;! int _recipeid; (nonatomic, retain) NSMutableArray (nonatomic) int recipeid; -(id)initwithrecipeid:(int)recipeid; -(void)addreview:(review *)r; -(void)doneparsingreviews; -(BOOL)empty;

22 Reviews.h Member Variable Declarations Reviews : LoadedResource {! NSMutableArray *_reviewlist;! int _recipeid; (nonatomic, retain) NSMutableArray (nonatomic) int recipeid; -(id)initwithrecipeid:(int)recipeid; -(void)addreview:(review *)r; -(void)doneparsingreviews; -(BOOL)empty;

23 Reviews.h Method Declarations Reviews : LoadedResource {! NSMutableArray *_reviewlist;! int _recipeid; (nonatomic, retain) NSMutableArray (nonatomic) int recipeid; -(id)initwithrecipeid:(int)recipeid; -(void)addreview:(review *)r; -(void)doneparsingreviews; -(BOOL)empty;

24 Method Declaration + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad;

25 Method Declaration Method Type Identifier + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad;

26 Method Declaration + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad; Return type

27 Method Declaration Method Signature Keywords + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad;

28 Method Declaration + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad; Parameter Types

29 Method Declaration + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad; Parameter Names

30 Method Declaration + (id)cannedsearchwithname:(nsstring *)aname forad:(ad *)ad; [Search cannedsearchwithname:description forad:ad];

31 Properties Expose member objects outside the class. Add to header int (copy) NSString (retain) NSMutableArray (readonly) NSDate *dateresultslastloaded; to your source resultlist, ateresultslastloaded;

32 Dot Notation These are equivalent: search.keyword [search setkeyword:@"taco"]; Also, these are equivalent: NSString *thekeyword = search.keyword; NSString *thekeyword = [search keyword];

33 NSString NSString *firstkeyword tacos"; NSString *secondkeyword = [NSString tacos", 3];

34 NSArray NSArray *arraya = [NSArray array]; NSArray *arrayb = [NSArray arraywithobjects:conde, nast, nil]; NSArray *arrayc = [[NSArray alloc] initwithobjects: converge, usc, nil];

35 Simple Iteration! for(nsstring *name in people){!! = name);! }

36 Cocoa Touch Cocoa: Framework for OSX Cocoa Touch: Framework for ios

37 Structure

38 App Delegate Root object Controls application

39 MVC Model: CoreData Views: UIView Controllers: UIViewController, NSXMLParser, etc.

40 Model: CoreData Schema-driven object graph management and persistence framework -Apple Simple GUI editor Powerful SQLite framework under the hood Generates basic code

41 Coredata: Example

42 Views: UIView One view per screen, composed of subviews. Text label, image, table, etc. UIWebView

43 UIView

44 UIView CGRect frame = CGRectMake(0,0,50,50); UIView *myview = [[UIView alloc] initwithframe:frame]; myview.backgroundcolor = [UIColor greencolor]; [self.view addsubview myview]; [myview release];

45 UIImageView UIImageView

46 UIImageView NSString *logoname epicurious_logo.png ; UIImage *logo = [UIImage imagenamed:logoname]; UIImageView *logoview = [[UIImageView alloc]!!!!!!! initwithimage:logo]; [self.view addsubview:logoview]; [logoview release];

47 UITableView

48 UITableView UITableView *cannedsearchtable = [[UITableView alloc] initwithframe:cgrectmake(10, 57, 300, 240) style:uitableviewstyleplain]; cannedsearchtable.delegate = self; cannedsearchtable.datasource = self; cannedsearchtable.rowheight = 40; cannedsearchtable.backgroundcolor = [UIColor clearcolor]; cannedsearchtable.separatorstyle = UITableViewCellSeparatorStyleNone; [self setview:cannedsearchtable]; [cannedsearchtable release];

49 UITableViewCell UITableViewCell

50 UITableViewCell - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ static NSString *CellIdentifierEdit HomeButtonCell *cell = (HomeButtonCell *)[tableview dequeuereusablecellwithidentifier:cellidentifieredit]; if (cell == nil) { cell = [[[HomeButtonCell alloc] initwithframe:cgrectzero reuseidentifier:thiscellidentifier] autorelease]; }! [cell setimageandtextforhomebutton:btn];! return cell; }

51 UILabel UILabel

52 UILabel UILabel *label = [[UILabel alloc] init]; label.text Healthy Lunches ; label.textcolor = [UIColor whitecolor]; label.backgroundcolor = [UIColor clearcolor]; label.alpha = 0.9; label.font = [UIFont fontwithname:@ Helvetica size:12]; [self.contentview addsubview:label]; [label release];

53 UIButton UIButton

54 UIButton UIButton *search = [UIButton buttonwithtype:uibuttontypecustom]; search.frame = CGRectMake(0, 330, 320, 75); [search setimage:[uiimage imagenamed:@"search_btn.png"] forstate:uicontrolstatenormal]; [search setimage:[uiimage imagenamed:@"search_btn_on.png"] forstate:uicontrolstatehighlighted]; [search addtarget:self action:@selector(showcustomsearch) forcontrolevents:uicontroleventtouchupinside]; [self.view addsubview:search];

55 UIWebView UIWebView

56 UIWebView self.infowebview = [[UIWebView alloc] init]; self.infowebview.delegate = [RecipeWebViewDelegate shareddelegate]; self.infowebview.backgroundcolor = [UIColor clearcolor]; NSString *html recipe information here</div></body></html>"; [self.infowebview loadhtmlstring:html baseurl:[nsurl URLWithString:@" [contentview addsubview:self.infowebview];

57 Controllers UIViewControllers Utilities: XML parsers, Downloaders, etc.

58 UINavigationController

59 UINavigationController UIViewController *rootvc = [[UIViewController alloc] init]; UINavigationController *navvc = [ [UINavigationController alloc] initwithrootviewcontroller:rootvc ]; // do something with navvc [navvc release]; [rootvc release];

60 UISplitViewController

61 UISplitViewController

62 UISplitViewController UISplitViewController *splitviewcontroller = [[UISplitViewController alloc] init]; splitviewcontroller.viewcontrollers = [NSArray arraywithobjects:masternavigationcontroller, detailnavigationcontroller, nil];! splitviewcontroller.view.backgroundcolor = [UIColor clearcolor]; [window addsubview:splitviewcontroller.view]; [splitviewcontroller release];

63 Animation Easy to use! Maintains physical metaphor.

64 Animation

65 Animation [scrollview setcontentoffset:cgpointmake(0,0) animated:no];

66 Animation [scrollview setcontentoffset:cgpointmake(-340,0) animated:no]; [UIView beginanimations:nil context:null]; [UIView setanimationduration:.25]; [scrollview setcontentoffset:cgpointmake(0,0) animated:no]; [UIView commitanimations];

67 ipad

68 Epicurious ipad

69 Navigational Structure iphone: UINavigationController ipad: UISplitViewController + two UINavigationControllers

70 Navigational Structure

71 Search

72 Classic Recipe View

73 Memory Management

74 No Garbage Collection

75 Overview Local objects should be released or autoreleased Member objects that are retained should be released in the dealloc method

76 Ownership Retention alloc retain copy new*

77 Ownership Release release autorelease

78 Real-world Metaphor? alloc: I make a cookie. retain: Lucy claims joint custody. release: Lucy decides she s not hungry. autorelease: I leave cookie on the table.

79

80 The Rule Within a given scope, if you cause an object to be retained, you re responsible for getting rid of it, either through release or autorelease.

81 dealloc You never call dealloc directly. Once retain count is zero, the system will call dealloc. However, you must implement dealloc.

82 dealloc -(void)dealloc{! [_keyword release];! [_attributes release]; //any other instance variables // or housecleaning!! [super dealloc]; }

83 Memory Leaks -(void)reset{! NSNumber *zero = [[NSNumber alloc] initwithint:0];! [self setcount:zero];! } BAD

84 Memory Leaks -(void)reset{! NSNumber *zero = [[NSNumber alloc] initwithint:0];! [self setcount:zero];! [zero release];! } GOOD!

85 Bad Release -(void)reset{! NSNumber *zero = [NSNumber numberwithint:0];! [self setcount:zero];! [zero release]; } BAD

86 Bad Release -(void)reset{! NSNumber *zero = [NSNumber numberwithint:0];! [self setcount:zero];! } GOOD!

87 Troubleshooting

88 XCode IDE for developing ios apps Includes Static Analyzer + Instruments

89

90 Static Analyzer Points out memory issues before they re a problem Build & Analyze

91 Instruments Object Allocations Memory Leaks Activity Monitor CoreData Time Profiler UI Automation & more!

92 Object Allocations Track heap memory Useful if you need to track down rogue memory or ensure an object is deallocated

93 Memory Leaks Checks for memory leaks duh.

94 Activity Monitor System Activity CPU Memory Disk Network

95 CoreData CoreData Filesystem Activity Fetches Cache misses Saves

96 Time Profiler Time-based sampling of processes

97 UI Automation Javascript based Simulates UI Speed through test to quickly detect issues

98 Threading

99 Threading Main thread belongs to the UI Everything else is you

100 Submission Process

101 Rejections Crashes Doesn t do what your App Store description claims Violates someone else s copyright Most notably, Apple s Violates HIG

102 Pre-submission First app? Setup your account well before you want to submit.

103 iads If you want your app to be free, consider iads. Expected to be huge money-maker.

104 Submission Expect a 3-7 day turnaround on your app. Can set availability date.

105 Summary

106 more? Tomorrow at 1pm: Talk on the more general process of design + development Resources developer.apple.com/iphone Stanford class - itunes.stanford.edu irc: freenode - #iphonedev me: convergese.kindofawesome.com

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

Acollada ios Charting Components

Acollada ios Charting Components Acollada ios Charting Components Acollada ios Charting Components... 1 LineChartView... 3 Description... 3 Screenshot... 3 Protocols to be implemented... 3 Customizing the LineChartView aspect... 4 How

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

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

Intro to Native ios Development. Dave Koziol Arbormoon Software, Inc.

Intro to Native ios Development. Dave Koziol Arbormoon Software, Inc. Intro to Native ios Development Dave Koziol Arbormoon Software, Inc. About Me Long time Apple Developer (20 WWDCs) Organizer Ann Arbor CocoaHeads President & ios Developer at Arbormoon Software Inc. Wunder

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

UICollectionView. NSCoder Milwaukee. 2 April John Psuik. Tuesday, April 2, 13

UICollectionView. NSCoder Milwaukee. 2 April John Psuik. Tuesday, April 2, 13 UICollectionView NSCoder Milwaukee 2 April 2013 John Psuik 1 UICollectionView New to ios 6 Layouts determine placement of items (flowlayout and custom layout) UITableView concepts, but you can do so much

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

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

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

CS 47. Beginning iphone Application Development

CS 47. Beginning iphone Application Development CS 47 Beginning iphone Application Development Introductions Who, why, which? Shameless Plug: LoudTap Wifi Access (If it works..) SSID: Stanford Username/password: csp47guest Expectations This is a programming

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 Views A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Draws and handles events in that rectangle Hierarchical A view has only one

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

ITP 342 Advanced Mobile App Dev. Memory

ITP 342 Advanced Mobile App Dev. Memory ITP 342 Advanced Mobile App Dev Memory Memory Management Objective-C provides two methods of application memory management. 1. In the method described in this guide, referred to as manual retain-release

More information

View Controller Lifecycle

View Controller Lifecycle View Controller Lifecycle View Controllers have a Lifecycle A sequence of messages is sent to them as they progress through it Why does this matter? You very commonly override these methods to do certain

More information

Announcement. Final Project Proposal Presentations and Updates

Announcement. Final Project Proposal Presentations and Updates Announcement Start Final Project Pitches on Wednesday Presentation slides dues by Tuesday at 11:59 PM Email slides to cse438ta@gmail.com Extensible Networking Platform 1 1 - CSE 438 Mobile Application

More information

IPhone Application of Carleton University. Carleton University Computer Science Honors Project Report

IPhone Application of Carleton University. Carleton University Computer Science Honors Project Report IPhone Application of Carleton University Carleton University Computer Science Honors Project Report Student Name: Yang Cai Student Number: 100309906 Project Supervisor: Dr. Dwight Deugo Date: Dec. 13,

More information

Review. iphone Application Programming Lecture 2: Objective-C, Cocoa. History. Objective-C. Device restrictions. Interaction paradigm changes

Review. iphone Application Programming Lecture 2: Objective-C, Cocoa. History. Objective-C. Device restrictions. Interaction paradigm changes Review iphone Application Programming Lecture 2: Objective-C, Cocoa Device restrictions Gero Herkenrath Media Computing Group RWTH Aachen University Winter Semester 2013/2014 http://hci.rwth-aachen.de/iphone

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

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

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

CS193p Spring 2010 Monday, April 12, 2010

CS193p Spring 2010 Monday, April 12, 2010 CS193p Spring 2010 Announcements Axess! Make sure your grading option matches what you were approved for Sonali s Office Hours Changed Friday 11am to 1pm Thursday 10am to noon Gates B26B Any questions

More information

CS193P - Lecture 10. iphone Application Development. Performance

CS193P - Lecture 10. iphone Application Development. Performance CS193P - Lecture 10 iphone Application Development Performance 1 Announcements 2 Announcements Paparazzi 2 is due next Wednesday at 11:59pm 2 Announcements Paparazzi 2 is due next Wednesday at 11:59pm

More information

Mobile Application Development

Mobile Application Development Mobile Application Development Lecture 12 Introduction to ObjectiveC 2013/2014 Parma Università degli Studi di Parma Lecture Summary ObjectiveC language basics Classes and objects Methods Instance variables

More information

Monday, 1 November The ios System

Monday, 1 November The ios System The ios System System Overview System Overview System Overview System Overview System Overview System Overview Foundation Classes (Useful) Foundation Framework Value and collection classes User defaults

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

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

ITP 342 Mobile App Dev. Fundamentals

ITP 342 Mobile App Dev. Fundamentals ITP 342 Mobile App Dev Fundamentals Objective-C Classes Encapsulate data with the methods that operate on that data An object is a runtime instance of a class Contains its own in-memory copy of the instance

More information

Why Model-View-Controller?

Why Model-View-Controller? View Controllers Why Model-View-Controller? Ever used the word spaghetti to describe code? Clear responsibilities make things easier to maintain Avoid having one monster class that does everything Why

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

Widget Tour. iphone and ipod touch Development Fall 2009 Lecture 7

Widget Tour. iphone and ipod touch Development Fall 2009 Lecture 7 Widget Tour iphone and ipod touch Development Fall 2009 Lecture 7 Questions? Announcements Assignment #2 due Tonight by 11:59pm Today s Topics Controls Buttons Switches Sliders Segmented Controls Text

More information

Xcode 4 Cookbook. Steven F. Daniel. Chapter No. 2 "User Interfaces Creating the UI"

Xcode 4 Cookbook. Steven F. Daniel. Chapter No. 2 User Interfaces Creating the UI Xcode 4 Cookbook Steven F. Daniel Chapter No. 2 "User Interfaces Creating the UI" In this package, you will find: A Biography of the author of the book A preview chapter from the book, Chapter NO.2 "User

More information

ios: Objective-C Primer

ios: Objective-C Primer ios: Objective-C Primer Jp LaFond Jp.LaFond+e76@gmail.com TF, CS76 Announcements n-puzzle feedback this week (if not already returned) ios Setup project released Android Student Choice project due Tonight

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 One last Objective-C topic: Protocols Using protocols to define/implement/use a data source and/or delegate Views UIView and UIWindow classes

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

Objective-C Part 2 (ECS189H) Ken Joy Serban Porumbescu

Objective-C Part 2 (ECS189H) Ken Joy Serban Porumbescu Objective-C Part 2 (ECS189H) Ken Joy joy@cs.ucdavis.edu Serban Porumbescu porumbes@cs.ucdavis.edu Today Objective-C Memory Management Properties Categories and Protocols Delegates Objective-C Memory Management

More information

Stanford CS193p. Developing Applications for ios. Spring Stanford CS193p. Spring 2012

Stanford CS193p. Developing Applications for ios. Spring Stanford CS193p. Spring 2012 Developing Applications for ios Foundation Framework NSObject Base class for pretty much every object in the ios SDK Implements introspection methods, etc. - (NSString *)description is a useful method

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

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

Contents. iphone Training. Industry Trainers. Classroom Training Online Training ON-DEMAND Training. Read what you need

Contents. iphone Training. Industry Trainers. Classroom Training Online Training ON-DEMAND Training. Read what you need iphone Training Contents About iphone Training Our ios training classes can help you get off to a running start in iphone, ipod and ipad app development. Learn from expert Objective-C developers with years

More information

Review (Basic Objective-C)

Review (Basic Objective-C) Classes Header.h (public) versus Implementation.m (private) @interface MyClass : MySuperclass... @end (only in header file) @interface MyClass()... @end (only in implementation file) @implementation...

More information

iphone Programming Patrick H. Madden SUNY Binghamton Computer Science Department

iphone Programming Patrick H. Madden SUNY Binghamton Computer Science Department iphone Programming Patrick H. Madden SUNY Binghamton Computer Science Department pmadden@acm.org http://optimal.cs.binghamton.edu General Outline Overview of the tools, and where to get more information

More information

Views. A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space

Views. A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Views A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Draws and handles events in that rectangle Hierarchical A view has only one superview - (UIView *)superview

More information

Mobile Application Development

Mobile Application Development Mobile Application Development Lecture 13 Introduction to ObjectiveC Part II 2013/2014 Parma Università degli Studi di Parma Lecture Summary Object creation Memory management Automatic Reference Counting

More information

CS193P - Lecture 3. iphone Application Development. Custom Classes Object Lifecycle Autorelease Properties

CS193P - Lecture 3. iphone Application Development. Custom Classes Object Lifecycle Autorelease Properties CS193P - Lecture 3 iphone Application Development Custom Classes Object Lifecycle Autorelease Properties 1 Announcements Assignments 1A and 1B due Wednesday 1/13 at 11:59 PM Enrolled Stanford students

More information

Intro to Development for ios. Dave Koziol Arbormoon Software, Inc.

Intro to Development for ios. Dave Koziol Arbormoon Software, Inc. Intro to Development for ios Dave Koziol Arbormoon Software, Inc. About Me Long time Apple Developer (21 WWDCs) Organizer Ann Arbor CocoaHeads President & ios Developer at Arbormoon Software Inc. Multiple

More information

Review. iphone Application Programming Lecture 2: Objective-C, Cocoa. History. Objective-C. Device restrictions. Interaction paradigm changes

Review. iphone Application Programming Lecture 2: Objective-C, Cocoa. History. Objective-C. Device restrictions. Interaction paradigm changes Review iphone Application Programming Lecture 2: Objective-C, Cocoa Device restrictions Gero Herkenrath Media Computing Group RWTH Aachen University Winter Semester 2013/2014 http://hci.rwth-aachen.de/iphone

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

A little more Core Data

A little more Core Data A little more Core Data A little more Core Data NSFetchedResultsController Interacts with the Core Data database on your behalf [fetchedresultscontroller objectatindexpath:] gets at row data [fetchedresultscontroller

More information

Assignment II: Foundation Calculator

Assignment II: Foundation Calculator Assignment II: Foundation Calculator Objective The goal of this assignment is to extend the CalculatorBrain from last week to allow inputting variables into the expression the user is typing into the calculator.

More information

Developing Applications for ios

Developing Applications for ios Developing Applications for ios Lab 2: RPN Calculator App (1 of 3) Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Task 1 Task: Create a new application

More information

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

Stanford CS193p. Developing Applications for ios Fall Stanford CS193p. Fall 2013 Developing Applications for ios -14 Today What is this class all about? Description Prerequisites Homework / Final Project ios Overview What s in ios? MVC Object-Oriented Design Concept Objective C (Time

More information

SAMPLE CHAPTER. Brendan G. Lim Martin Conte Mac Donell MANNING

SAMPLE CHAPTER. Brendan G. Lim Martin Conte Mac Donell MANNING SAMPLE CHAPTER Brendan G. Lim Martin Conte Mac Donell MANNING ios 7 in Action by Brendan G. Lim Martin Conte Mac Donell Chapter 2 Copyright 2014 Manning Publications brief contents PART 1 BASICS AND NECESSITIES...1

More information

Objective-C and COCOA Applications

Objective-C and COCOA Applications Objective-C and COCOA Applications Fall, 2012 Prof. Massimiliano "Max" Pala pala@nyu.edu Overview X-Code IDE Basics Objective-C Classes Methods Invocations Important Types Memory Management Protocols Exceptions

More information

ios Application Development Course Details

ios Application Development Course Details ios Application Development Course Details By Besant Technologies Course Name Category Venue ios Application Development Mobile Application Development Besant Technologies No.24, Nagendra Nagar, Velachery

More information

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Spring Stanford CS193p Spring 2011

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Spring Stanford CS193p Spring 2011 Developing Applications for iphone 4, ipod Touch, & ipad Today Dynamic Binding Introspection Foundation Framework Enumeration More Objective-C Allocating and Initializing objects Memory Management Demo

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

Corrections and version notes

Corrections and version notes Last updated 7 th May, 2014 Programming apps for the iphone Corrections and version notes Please feel free to email Graeme (gbsummers@graemesummers.info) for additional help or clarification on any of

More information

Integrating Game Center into a BuzzTouch 1.5 app

Integrating Game Center into a BuzzTouch 1.5 app into a BuzzTouch 1.5 app This tutorial assumes you have created your app and downloaded the source code; created an App ID in the ios Provisioning Portal, and registered your app in itunes Connect. Step

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

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

Page 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone

Page 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone GUI Programming Lecture 13: iphone Basics Until now, we have only seen code for standard GUIs for standard WIMP interfaces. Today we ll look at some code for programming mobile devices. on the surface,

More information

ios Development Lecture 1 Introduction to Objective-C Ing. Simone Cirani

ios Development Lecture 1 Introduction to Objective-C Ing. Simone Cirani ios Development Lecture 1 Introduction to ObjectiveC Ing. Simone Cirani email: simone.cirani@unipr.it http://www.tlc.unipr.it/cirani Simone Cirani, Ph.D. Corso IFTS Cisita ios Development 2014 Parma Università

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

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

Design Phase. Create a class Person. Determine the superclass. NSObject (in this case)

Design Phase. Create a class Person. Determine the superclass. NSObject (in this case) Design Phase Create a class Person Determine the superclass NSObject (in this case) 8 Design Phase Create a class Person Determine the superclass NSObject (in this case) What properties should it have?

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

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

Running Code on an ios Device. Appendix. The ios Developer Program

Running Code on an ios Device. Appendix. The ios Developer Program ------- Appendix A Running Code on an ios Device Developing for ios is many things: challenging, fun, rewarding, and exciting. One thing it is not is free. To begin, doing any legitimate ios development

More information

Lecture 8 Demo Code: Cassini Multithreading

Lecture 8 Demo Code: Cassini Multithreading Lecture 8 Demo Code: Cassini Multithreading Objective Included below is the source code for the demo in lecture. It is provided under the same Creative Commons licensing as the rest of CS193p s course

More information

Mobile Application Programming. Objective-C Classes

Mobile Application Programming. Objective-C Classes Mobile Application Programming Objective-C Classes Custom Classes @interface Car : NSObject #import Car.h + (int) viper; - (id) initwithmodel:(int)m; @implementation Car Point position; float velocity;

More information

Developing Applications for ios

Developing Applications for ios Developing Applications for ios Lecture 7: View Controller Lifecycle and UIKit Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Content View Controller

More information

Lesson 1: Hello ios! 1

Lesson 1: Hello ios! 1 Contents Introduction xxv Lesson 1: Hello ios! 1 ios Developer Essentials 1 A Suitable Mac 1 A Device for Testing 2 Device Differences 2 An ios Developer Account 4 The Official ios SDK 6 The Typical App

More information

Advanced Memory Analysis with Instruments. Daniel Delwood Performance Tools Engineer

Advanced Memory Analysis with Instruments. Daniel Delwood Performance Tools Engineer Advanced Memory Analysis with Instruments Daniel Delwood Performance Tools Engineer 2 Memory Analysis What s the issue? Memory is critical to performance Limited resource Especially on iphone OS 3 4 Memory

More information

iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5

iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5 iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5 Questions? Announcements Assignment #1 due this evening by 11:59pm Remember, if you wish to use a free late you must email me before

More information

CS193p Spring 2010 Thursday, April 29, 2010

CS193p Spring 2010 Thursday, April 29, 2010 CS193p Spring 2010 Announcements You should have received an e-mail by now If you received e-mail approving enrollment, but are not in Axess, do it! If you have any questions, please ask via e-mail or

More information

Announcements. Today s Topics

Announcements. Today s Topics Announcements Lab 2 is due tonight Lab 3 is posted Due next Wednesday Sept 30 th 1 Extensible - CSE 436 Software Networking Engineering Platform Workshop 1 Today s Topics Designing iphone Applica;ons Model-

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

CS193E Lecture #3 Categories and Protocols Cocoa Memory Management

CS193E Lecture #3 Categories and Protocols Cocoa Memory Management CS193E Lecture #3 Categories and Protocols Cocoa Memory Management Winter 2008, Dempsey/Marcos 1 Today s Topics Questions from Assignment 1A or 1B? Categories Protocols Cocoa Memory Management Object life

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

SQLitePersistentObjects

SQLitePersistentObjects SQLite Without the SQL Jeff LaMarche And that is spelled with an A contrary to the sign out front. Contacting Me jeff_lamarche@mac.com http://iphonedevelopment.blogspot.com Twitter: jeff_lamarche A lot

More information

A Better MVC. 300 line view controllers or bust. Dave A guy who thinks too deeply about stuff

A Better MVC. 300 line view controllers or bust. Dave A guy who thinks too deeply about stuff A Better MVC 300 line view controllers or bust Dave DeLong @davedelong A guy who thinks too deeply about stuff Heads Up This is all my opinion (! hi legal & pr teams!) Lots of similar terminology View

More information

The Best of Both Worlds: Using UIKit with OpenGL

The Best of Both Worlds: Using UIKit with OpenGL The Best of Both Worlds: Using UIKit with OpenGL Noel Llopis Snappy Touch Twitter: @snappytouch About Me iphone development full time for a year and a half. Flower Garden on the app store. Interesting

More information

CS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding

CS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding CS193E Lecture 7 Document-based Applications NSTableView Key-Value Coding Agenda Questions? Review: delegates, MVC Document-based apps Table views Key Value Coding Model, View, Controller Controller Model

More information

Collections & Memory Management. Lecture 2

Collections & Memory Management. Lecture 2 Collections & Memory Management Lecture 2 Demo: Accessing Documentation Collections NSArray a list of objects in order [array objectatindex:0] [array objectatindex:3] Counting starts at zero, not one NSSet

More information

Introductory ios Development

Introductory ios Development Introductory ios Development 152-164 Unit 2 - Basic Objective-C Syntax Quick Links & Text References Console Application Pages Running Console App Pages Basic Syntax Pages Variables & Types Pages Sequential

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

ITP 342 Advanced Mobile App Dev. Core Data

ITP 342 Advanced Mobile App Dev. Core Data ITP 342 Advanced Mobile App Dev Core Data Persistent Data NSUser Defaults Typically used to save app preferences Property List (plist) in Documents Directory Data is in a dictionary or an array Coders

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 Objective-C Compatibility Bridging Property List NSUserDefaults Demo: var program in CalculatorBrain Views Custom Drawing Demo FaceView Bridging Objective-C

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 Miscellaneous Error Handling Any Other Interesting Classes Views Custom Drawing Demo: Draw a Playing Card enum Thrown Errors In Swift, methods can throw errors

More information

Praktikum Entwicklung von Mediensystemen mit

Praktikum Entwicklung von Mediensystemen mit Praktikum Entwicklung von Mediensystemen mit Sommersemester 2013 Fabius Steinberger, Dr. Alexander De Luca Today Organization Introduction to ios programming Hello World Assignment 1 2 Organization 6 ECTS

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 Blocks Language syntax for declaring a function on the fly. Grand Central Dispatch C API for leveraging blocks to make writing multithreaded

More information

Android & iphone. A Comparison. Stefan Tramm JUGS, Jahresevent

Android & iphone. A Comparison. Stefan Tramm JUGS, Jahresevent 1 Android & iphone A Comparison Stefan Tramm JUGS, Jahresevent 2008-12-11 2 Agenda I Situation II Comparison III Essence 3 Situation before 2007 Three platforms J2ME Symbian Windows Mobile all the same

More information

Objective-C. Stanford CS193p Fall 2013

Objective-C. Stanford CS193p Fall 2013 New language to learn! Strict superset of C Adds syntax for classes, methods, etc. A few things to think differently about (e.g. properties, dynamic binding) Most important concept to understand today:

More information

User Experience: Windows & Views

User Experience: Windows & Views View Controller Programming Guide for ios User Experience: Windows & Views 2011-01-07 Apple Inc. 2011 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval

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

Where to Find Specific Information

Where to Find Specific Information The Mobile Connector library is a component that you include into your XCode project and allows you to connect to a Live Guide server to initiate chats. It allows you to connect to a campaign, check its

More information

CS193p Spring 2010 Wednesday, March 31, 2010

CS193p Spring 2010 Wednesday, March 31, 2010 CS193p Spring 2010 Logistics Lectures Building 260 (History Corner) Room 034 Monday & Wednesday 4:15pm - 5:30pm Office Hours TBD Homework 7 Weekly Assignments Assigned on Wednesdays (often will be multiweek

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

The MVC Design Pattern

The MVC Design Pattern The MVC Design Pattern The structure of iphone applications is based on the Model-View-Controller (MVC) design pattern because it benefits object-oriented programs in several ways. MVC based programs tend

More information