Your SlideShare is downloading. ×
0
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Objective-Cひとめぐり
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Objective-Cひとめぐり

8,958

Published on

2011/3/3 mixi engineers seminar発表資料。

2011/3/3 mixi engineers seminar発表資料。

Published in: Technology
0 Comments
17 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
8,958
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
71
Comments
0
Likes
17
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    1. Objective-C 2011 / 3 / 3 Kenji Kinukawa
    2. => k.kinukawa, k_kinukawa2010 11 =>2009 => Trangram
    3. AppleApple
    4. =>Objective-C Objective-C
    5. Objective-C
    6. Objective-C
    7. 1983 , Stepstone1985 NeXT Computer1995 Next Stepstone Obj-C1997 Apple Next Jobs Mac OS X2007 iPhone Obj-C -wikipedia
    8. iOS Cocoa Touch iOS Cocoa UIKit Touch & FoundationCore OS &
    9. Objective-C■■C■SmallTalk
    10. ■■for, while, if, switch, C■■iOS GC malloc free
    11. ■ MyUtil.h @interface MyUtil{ ... } ... @end MyUtil.m @implementation MyUtil ... @end
    12. ■MyUtil.h @interface MyUtil{ int hoge; } -(int)sumAB:(int)a adder:(int)b; -(int)diffAB:(int)a differ:(int)b; @end
    13. ■MyUtil.m @implementation MyUtil -(int)sumAB:(int)a adder:(int)b { return a+b; } -(int)diffAB:(int)a differ:(int)b { return a-b; } @end
    14. ■ -(double)evaluation:(int)val { hoge; huga; return buzz; }
    15. ■id id id id obj; [obj msg];
    16. ■NSString * obj;[obj hogehuga];warning: NSString may not respond to -hogehuga NSString -hogehuga
    17. ■ * hoge = [[ alloc] init];
    18. ■ [obj msg];
    19. SICP(define (fact n) (if (= n 1) 1 (* (fact (- n 1)) n)))(define (fact2 n) (define (in-fact n ans) (if (= n 1) ans (in-fact (- n 1) (* ans n)))) (in-fact n 1))(define (fact3 n) (define (fact2-iter n ans) (if (= n 0) ans (fact2-iter (- n 1) (* n ans)))) (fact2-iter n 1))(print (fact3 12000))
    20. ■ [obj getHoge];
    21. Obj-C
    22. ■ ※ -(double)evaluation:(int)val; evaluation: -(double)evaluation:(int)val max:(int)a; evaluation:max:
    23. ■SELSELSEL [obj callHoge]; SEL action = @selector(callHoge); [obj performSelector:action];
    24. ■IMPObj-C C IMPIMP funcp = [foo methodForSelector: @selector(callHoge)];xyz =(*funcp)(foo, @selector(callHoge),nil,nil);
    25. ■ Mac Objective-C2.0 GC [obj retain]; [obj release];
    26. ■ interface @protocol MGVoiceClientDelegate<NSObject> -(void)mgVoiceClient:(NSURLConnection *)conn didReceiveResponseError:(NSString *)error; -(void)mgVoiceClient:(NSURLConnection *)conn didFailWithError:(NSError*)error; -(void)mgVoiceClient:(NSURLConnection *)conn didFinishGetting:(NSArray *)voices; -(void)mgVoiceClient:(NSURLConnection *)conn didFinishPosting:(id)reply; @end@interface VoiceTableViewController : UITableViewController <MGVoiceClientDelegate>{ MGVoiceClient * voiceClient; NSArray * voiceArray;}
    27. ■ Not NSString+Parse.h@interface NSString (Parse)-(NSDictionary)parseJson:(NSString *)str;-(NSDictionary)parseXml:(NSString *)str;-(NSDictionary)parseYaml:(NSString *)str;@end[str parseJson:jsonStr]; NSString Parse
    28. ■ NSString+Parse.h@interface NSString (Parse)-(NSDictionary)parseJson:(NSString *)str;-(NSDictionary)parseXml:(NSString *)str;-(NSDictionary)parseYaml:(NSString *)str;@end[str parseJson:jsonStr]; NSString Parse
    29. ■Cocoa A B method A method B
    30. ■ A B method A Obj-C
    31. ■ A B method A method A delegate B Obj-C
    32. ■@protocol MGVoiceDelegate;@interface MGVoice : NSObject{@public id <MGVoiceDelegate> delegate;}@end-(void)mgCommentClient:(NSURLConnection *)conn didFinishGetting:(NSArray *)commentArray{ if([delegate respondsToSelector:@selector(mgVoice:didFinishGettingComments:)]){ [delegate mgVoice:conn didFinishGettingComments:commentArray]; }}- (void)viewDidLoad { [super viewDidLoad]; voice.delegate = self;}-(void)mgVoice:(NSURLConnection *)conn didFinishGettingComments:(NSArray *)commentArray{ if([commentArray count]>0){ MGComment * comment = [commentArray objectAtIndex:0]; commentText.text = comment.commentText; }else{ commentText.text = @" "; }}
    33. ■BlocksApple C ISOLLVM iOS4.0LLVM Compiler 2.0LLVM LLVM 2.0 C Objective-C C++LLVM GCC 2Xcode 4 LLVM IDE LLVM Xcode IDE C C++ Objective-C block lambda
    34. ■Blocks void (^b)() = ^{ printf("im in blockn"); }; b();
    35. ■Blocks void (^b)() = ^{ printf("im in blockn"); }; b(); CBlock Block_copy(),Block_release()
    36. iOS4 Blocksex) GCD( )
    37. ■ Objective-C
    38. ■ mixi graph API mixi graph API iPhone ※

    ×