Starting iPhone Sdk

1,978 views

Published on

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,978
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
























  • Starting iPhone Sdk

    1. 1. iPhone ~ Interface Builder ~
    2. 2. • iPhoneSDK • • • IB Hello World
    3. 3. iPhoneSDK • iPhoneSDK Xcode iPhone App Interface Builder UI iPhone MacOSX Instruments
    4. 4. Xcode
    5. 5. iPhoneApp Navigation-Based Application ) OpenGL ES Application OpenGL ) 3D Tab Bar Application ) iPod
    6. 6. iPhoneApp Utility Application Dashboard Widget ) App View-based Application Window-based Application Window
    7. 7. Classes Other Sources Project main Resources Frameworks Products
    8. 8. Interface Builder
    9. 9. Interface Builder
    10. 10. Interface Builder
    11. 11. Interface Builder
    12. 12. Interface Builder
    13. 13. Instruments Xcode [ ]→[ ]→[Activity Monitor]
    14. 14. Objective-C ■ / : interface : implementation □ □ @interface MyWidget/* */:BaseWidget/* */{ @implementation MyWidget/* */ // // int hoge; - (id)initWithHoge:(int)_hoge { NSString *string; } // } - (id)initWithHoge:(int)_hoge; - (BOOL)hogehoge; - (BOOL)hogehoge { @end } @end
    15. 15. Objective-C □ [receiver message]; □ □ MyWidget *widget = [MyWidget alloc]; [widget release]; MyWidget *widget = [[MyWidget alloc] initWithHoge:10];
    16. 16. main.m #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { // NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // UIApplicationMain int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } UIApplicationMain UIApplication Info.plist xib xib applicationDidFinishLaunching Delegate !!
    17. 17. main.m #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { // NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // UIApplicationMain int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; Delegate } UIApplicationMain UIApplication Info.plist xib xib applicationDidFinishLaunching Delegate !!
    18. 18. main.m #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { // NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // UIApplicationMain int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; Delegate } UIApplicationMain UIApplication Info.plist xib xib applicationDidFinishLaunching Delegate !!
    19. 19. Hello World!
    20. 20. Hello World! [ ]
    21. 21. Hello World! [ ] □ “Hello, World!”
    22. 22. Hello World! [ ] □ “Hello, World!” □ ”hoge” “Hello, hoge!”
    23. 23. ■ Window Window □ UIWindow ViewController □ View View   ■ View Subview  □ UIView □ UI □ UI ■ ViewController □ View
    24. 24. HelloWorldViewController.h #import <UIKit/UIKit.h> @interface HelloWorldViewController : UIViewController { IBOutlet UITextField *textField; // IBOutlet UILabel *label; // } - (IBAction)pushed:(id)sender; // @end Interface Builder Xcode ( ) UILabel View
    25. 25. IB □ UI □ ViewController IB ViewController View Interface Builder

    ×