Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mobile China Forum App Conference 2011 iOS Session

1,430 views

Published on

Published in: Technology, Education
  • Be the first to comment

Mobile China Forum App Conference 2011 iOS Session

  1. 1. iOS Introduction Mobile*China Forum App Conference 2011Santa Clara Convention Center, Santa Clara October 23, 2011
  2. 2. Silence
  3. 3. Follow Us #iOS • Adjunct Professor • Guest Lecture @ University • Conference Speaker • Technical EditorBess Ho@bess • Book Author
  4. 4. Follow Us #iOS • 10 years in Web designer & development • 3 years in MobileBess Ho • Focus in UI & Architecture@bess • Background in consumer behavior & data analytic • Advising startup at seed & early stage
  5. 5. Why iOS
  6. 6. 93% of Fortune 500 companiesare testing or deploying theiPhone.Over 80% of the top hospitals inthe US are testing or pilotingiPads.92% of the Fortune 500companies are testing ordeploying iPad. It is unheard of.
  7. 7. 250 Million iOS Devices
  8. 8. #1iOS the number 1 mobile OS
  9. 9. Single App Idea
  10. 10. Requirements• Intel-based Mac OSX Snow Leopard or Lion• Update Mac OSX Software 10.6.8 or 10.7• Apple Developer Account• Safari (FREE) Mac ($99/yr) iOS ($99/yr)• iOS4.3 SDK• Xcode 3 or Xcode 4 ($)• Requires 5GB+ Download• Requires 11GB+ Install Bess.co 2011 Copyright © All rights are reserved
  11. 11. Apple Developer Accthttp://developer.apple.com/programs/register/ FREE Bess.co 2011 Copyright © All rights are reserved
  12. 12. Bess.co 2011 Copyright © All rights are reserved
  13. 13. Bess.co 2011 Copyright © All rights are reserved
  14. 14. Xcode 4Instruments Interface Builder Bess.co 2011 Copyright © All rights are reserved
  15. 15. Xcode 4IDEUI Editor - Interface BuilderDebuggerSource code repository ManagementSingle “workspace window” Bess.co 2011 Copyright © All rights are reserved
  16. 16. workspace windowBess.co 2011 Copyright © All rights are reserved
  17. 17. Xcode 4 workspace window Bess.co 2011 Copyright © All rights are reserved
  18. 18. Bess.co 2011 Copyright © All rights are reserved
  19. 19. Bess.co 2011 Copyright © All rights are reserved
  20. 20. TemplatesiOS4 Bess.co 2011 Copyright © All rights are reserved
  21. 21. MVCModel View Controller (MVC) pattern separatesapplication’s data structures (Model) from user interface(View) with the connecting layer (Controller) View Model Controller Bess.co 2011 Copyright © All rights are reserved
  22. 22. MVC.xib Data List of tasksView Model State of each task Object containing a table with cells allowing text entry and user interaction Controller ViewController Respond to user input or inform the view to update visual elements Trigger Model to perform action to data Bess.co 2011 Copyright © All rights are reserved
  23. 23. Simple App .xib Interface Builder View Controller Model .h & .m ViewControllerBess.co 2011 Copyright © All rights are reserved
  24. 24. Frameworks UIKit.frameworkFoundation.frameworkCoreGraphics.framewrkBess.co 2011 Copyright © All rights are reserved
  25. 25. Frameworks 1) Cocoa Touch touch and event-driven and interface componentsCocoa Touch 2) Media Play and record audio; animation for 2D & 3D Media 3) Core Services Access lower level features such as files, networking,Core Services location, in-app purchase 4) Core OS Core OS Access to memory, file system, lower level networking and hardware Bess.co 2011 Copyright © All rights are reserved
  26. 26. Bess.co 2011 Copyright © All rights are reserved
  27. 27. Bess.co 2011 Copyright © All rights are reserved
  28. 28. View Controller header file implementation file (.h) (.m) Declare Execute• instance variables• properties• methods Bess.co 2011 Copyright © All rights are reserved
  29. 29. Debugging/* This is a comment *//* * This is a comment * Continue into next line(s) */// This is a Comment Bess.co 2011 Copyright © All rights are reserved
  30. 30. Import Directive helloiphoneViewController.hNever include more than once // Include header files #import <UIKit/UIKit.h> // Declare class names and its superclasses @interface helloiphoneViewController : UIViewController <UITableViewDelegate> { } // Declare properties and methods // Close @interface directive @end Bess.co 2011 Copyright © All rights are reserved
  31. 31. Interface Directive helloiphoneViewController.h Protocol(s) Class Superclass// Include header files#import <UIKit/UIKit.h>// Declare class names and its superclasses@interface helloiphoneViewController : UIViewController<UITableViewDelegate> {}@end // Adding Multiple Delegates <UITableViewDelegate, UIAccelerometerDelegate> Bess.co 2011 Copyright © All rights are reserved
  32. 32. ViewController.h helloiphoneViewController.h#import <UIKit/UIKit.h>@interface helloiphoneViewController : UIViewController { UILabel *myLabel;}@property (nonatomic, retain) IBOutlet UILabel *myLabel;-void()myMethod;@end Property Instance variables Method Bess.co 2011 Copyright © All rights are reserved
  33. 33. Declare VariableDeclare an UILabel variable named “myLabel” // Declare UILabel variable UILabel *myLabel; Bess.co 2011 Copyright © All rights are reserved
  34. 34. Declare Property1) Declare a property of UILabel object named “myLabel”2) Assign IBOulet to UILabel object3) Assign retain and nonatomic to UILabel object// Declare UILabel variable@property (nonatomic, retain) IBOutlet UILabel *myLabel; Bess.co 2011 Copyright © All rights are reserved
  35. 35. Declare MethodDeclare a method that implementation file is going to use // Declare a method -void()myMethod; Bess.co 2011 Copyright © All rights are reserved
  36. 36. ViewController.m helloiphoneViewController.m#import directive #import "helloiphoneViewController.h"@implementation @implementation helloiphoneViewControllersection @synthesize myLabel;Synthesizing a property - (void)didReceiveMemoryWarning { // Releases the view if it doesnt have a superview. [super didReceiveMemoryWarning]; Method Declaration // Release any cached data, images, etc that arent in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; }@end directive @end Bess.co 2011 Copyright © All rights are reserved
  37. 37. IBOutlet vs IBAction UIElements Interface Builder add .xib UIViewIBActions IBOutlets Optional Always ViewController subclass Add UI elements to UIView in Interface Builder. You subclass UIViewController to add functionality. IBOutlets hook up UIElements in UIView to access them. IBActions trigger actions based on user gestures on UIView elements. Bess.co 2011 Copyright © All rights are reserved
  38. 38. UI Colorself.view.backgroundColor = [UIColor colorWithPatternImage:[UIImageimageNamed: @"Background.png"]]; Bess.co 2011 Copyright © All rights are reserved
  39. 39. 320 pixel 480 pixeliPhone /2011 Copyright © All rights are reserved Size Bess.co iTouch Screen
  40. 40. 640 pixel 960 pixeliPhoneCopyright © All rights are reserved Bess.co 2011 4 Screen Size
  41. 41. 768 pixel 1024 pixeliPad Screen SizeBess.co 2011 Copyright © All rights are reserved
  42. 42. Coding Options Universal App Bess.co 2011 Copyright © All rights are reserved
  43. 43. Icon.png Icon@2x.png iTunesArtwork57 x 57 pixelIcon-72.png 114 x 114 pixel Icon-Small.png72 x 72 pixel 29 x 29 pixel 512 x 512 pixelIcon-Small-50.png Icon-Small@2x.png 50 x 50 pixel 58 x 58 pixel App Icons reserved Bess.co 2011 Copyright © All rights are
  44. 44. Paper Wireframe Pen + Paper
  45. 45. Digital Wireframe Balsamiq http://www.balsamiq.com/
  46. 46. http://www.slideshare.net/bess.ho Q&A Find out class schedules http://bit.ly/iOSClass http://www.udemy.com/ios-development/
  47. 47. Q&A Thank you Find out class schedules http://bit.ly/iOSClasshttp://www.udemy.com/ios-development/ Bess.co 2011 Copyright © All rights are reserved

×