1 / 84

iPhone Development

iPhone Development. 박종화 suakii@gmail.com. Contents. Requirements iOS SDK iOSOverView Objective-C Design Pattern App Dev Cycle QA. Trend. Smartphone OS. Smartphone OS. Why?. Differences. Only One Running Application Only One Window Limited Access Limited Response Time

josef
Download Presentation

iPhone Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. iPhone Development 박종화 suakii@gmail.com

  2. Contents • Requirements • iOS SDK • iOSOverView • Objective-C • Design Pattern • App Dev Cycle • QA

  3. Trend

  4. Smartphone OS

  5. Smartphone OS

  6. Why?

  7. Differences • Only One Running Application • Only One Window • Limited Access • Limited Response Time • Limited Screen Size • Limited System Resources • No Garbage Collection

  8. Requirements

  9. Requirements • Intel Based Snow Leopard • iPhone or iPod Touch • Xcode • iOSSDK • Objected Oriented Concepts

  10. Hardware

  11. Hardware

  12. Hardware

  13. Hardware

  14. Software

  15. Developer Programs • iOS Developer – Individual ($99/year) • iOSDeveloper – Enterprise ($299/year) • iOS Developer – Student ($0)

  16. iPhone Platform • ARM Processor(Samsung, Apple) • 512MB RAM (iPhone4) • BSD UNIX • Mach kernel • COCOA APIs

  17. iOS SDK

  18. SDK Tools • Frameworks • Xcode Tools • iPhone Simulator • iPhone Reference Library

  19. Frameworks • Apple delivers most of its system interfaces in special packages called frameworks. • A framework is a directory that contains a dynamic shared library and the resources need to support that library

  20. Frameworks

  21. Xcode Tools Xcode Interface Builder Instruments

  22. Xcode

  23. Interface Builder

  24. Instruments

  25. Xcode Tools • GCC compiler 4.2 • Support for Obj-C, C++, Java, Python and Ruby (iPhone only uses Obj-C & C++) • Code editor with code completion • Support for SVN and CVS

  26. Interface Builder • Tool for laying out interfaces • Separate Tool from Xcode • Bind Actions and Outlets in Controllers

  27. Simulator

  28. Simulator

  29. Simulator

  30. iOS OverView

  31. iOS 4.1 • Multitasking • Folders • Threaded email • iBooks • Game Center • Not support Flash or Java

  32. iOS Core Services Cocoa Touch Core OS Media

  33. iOS Core Services Cocoa Touch Core OS Media

  34. iOS Core Services Cocoa Touch Core OS Media

  35. iOS Core Services Cocoa Touch Core OS Media

  36. Application Life Cycle

  37. Event-Handling

  38. Interruptions

  39. Main.m #import <UIKit/UIKit.h> int main(intargc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePoolalloc] init]; intretVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; }

  40. Performance • Do Not Block the Main Thread • Use Memory Efficiently • Floating-Point Math Considerations • Reduce Power Consumption • Tune Your Code • Improve File Access Times • Tune Your Networking Code

  41. Objective-C

  42. OO Terms • Class • Instance • Message • Method • Instance Variable • Inheritance • Superclass/Subclass • Protocol

  43. History

  44. Objective-C • Somewhere in-between C++ and Java • Created by Brad Cox & Tom Love • Invented in 1980’s for Next Computing • Based on C with SmallTalk like extentions • Used in COCOA, OpenStep and GNUStep • Class based OO language

  45. Objective-C • 객체를 중심으로 작성 • 객체는 데이터와 데이터를 조작하는 동작으로 이루어진다. • 동작을 객체의 method, 객체의 데이터를 instance variable • Objective-C는 동적인 언어로서 실행시에 객체나 매소드가 변할 수 있다.

  46. Class Interface #import <UIKit/Uikit.h> @interface HelloWorldViewController : UIViewController { //Instance Variable UIButton button; UILabel *label; } //property @property (nonautomatic, retain) IBOutletUILabel *label; //method -(IBAction)sayHello:(id)sender; @end

  47. Class Implementation • #import “HelloWorldViewController.h” • @implementation HelloWorldViewController • @synthesize label; • -(IBAction) sayHello:(id) sender { • label.text = @”Hello, World”; • } • -(void)viewDidLoad { • } • (void)dealloc { [label release]; • [super dealloc]; • } • @end

  48. Class Allocation • HelloWorldViewController *obj = [[HelloWorldViewControlleralloc] init];

  49. Property • 인스턴스 변수에 대한 접근자메소드의 구현의 편리 label - getter setLabel: - setter • @synthesize • Dot Syntax label.text = @”Hello, World”; [label setText:@”Hello, World”];

  50. Properties • Readonly • Retain • Readwrite • Copy • Assign

More Related