Your SlideShare is downloading. ×
[KJ-CODE] 스터디 소개, category
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

[KJ-CODE] 스터디 소개, category

101
views

Published on

KJ-CODE 2014년 2월22일 …

KJ-CODE 2014년 2월22일
KJ-CODE 소개 및 자기소개
Obj-C Category Programming

Published in: Technology

1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
101
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
1
Likes
0
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

Transcript

  • 1. Introduce KJ-CODE 2014.02.22 Ji SangHoon in KJ-CODE
  • 2. KJ-CODE 2010.06.19 2010.10.16 2013.06.29 • Start from 2010. 6 • Start 9 Members • Study iOS Develop & IT Trend & IT Skills • We Still Study iOS with 15 Members • 6 Members are iOS Developer 2013.09.07
  • 3. Who Am I Game Dev Embeded System Dev iOS DEV 2010 ~
  • 4. Objective-C Category Programming 2014.02.22 Ji SangHoon in KJ-Code
  • 5. Inherit • Vertical Inherit • Make new class • Can add new variable • Can access variable (expect @private) • Can add new method • Can use override method
  • 6. Category • Horizon Inherit • Use original class • Can not add new variable (except static variable) • Can access variable (also @private) • Can add new method • Can not use override method
  • 7. Inherit vs Category Inherit Category ○ × Add New Variable ○ △ (static variable) Access Variable △ (expect @private) ○ Add New Method ○ ○ Override Method ○ × Make New Class
  • 8. Syntax Inherit @interface <Class Name> : UIViewController @interface OverlayViewController : UIViewController @interface MyTableViewController : UITableViewController Category @interface UIViewController (<Category Name>) @interface UIViewController (OverlayView)
  • 9. How To Make New File… -> Objective-C Category File Name Input Category Name & Select Category On Class <Inherit Class Name> + <Category Name>.h / m
  • 10. DEMO
  • 11. Categories in Demo UIViewController+OverlayView UIColor+DefineColor UIImage+blur UIView+ScreenShot UILabel+AutoSize NSUserDefault+Addition You can download Sample Source Code in Github All KJ-CODE Sample Source https://github.com/dunkeyike/KJ-Code_ALL Category Sample Source https://github.com/dunkeyike/KJ-Code_ALL/tree/master/20140215_category
  • 12. See Also.. Apple Developer Center - Customizing Existing Classes https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ ProgrammingWithObjectiveC/CustomizingExistingClasses/ CustomizingExistingClasses.html#//apple_ref/doc/uid/TP40011210-CH6-SW1 Objective-C:カテゴリで「できること」と「できないこと」 http://blog.livedoor.jp/kurokawh/archives/2469395.html Objective-Cの既存のクラスを拡張する仕組み http://labs.torques.jp/2011/01/14/1596/