본 글은 아래의 책에서 참고된 내용입니다.
전 강좌에서는 코코아 터치가 iOS에서 어떠한 위상을 차지하는지 배웠다.
이번에는 코코아터치 레이어가 다루는 클래스에 대해서 알아보고자 한다.
$$ Cocoa Fundamentals
코코아 터치는 다음과 같은 클래스들로 이루어져 있다.
$ Core Application Classes
$ Data Type Classes
$ Interface Classes
---------------------------------------------------------------------------------------------
각각의 클래 집합들은 아래와 같다.
$ Core Application Classes
When you create a new application with even the most basic user interaction, you’ll be taking
advantage of a collection of common core classes. Many of these you won’t be touching, but
they still perform an important role. Let’s review several of these classes now.
- The Root Class ( NSObject )
- The Application Object ( UIApplication )
- Window Objects ( UIWindow )
- Views ( UIView )
- Responders ( UIResponder )
- Onscreen Controls ( UIControl )
- View Controllers ( UIViewController )
$ Data Type Classes
An object can potentially hold data. In fact, most of the classes we’ll be using contain a number
of properties that store information about an object. There are, however, a set of Foundation
classes that you use throughout this book for the sole purpose of storing and manipulating infor-
mation
- Strings ( NSString/NSMutableString )
- NSMutableString
- Arrays ( NSArray/NSMutableArray)
- Dictionaries ( NSDictionary/NSMutableDictionary )
- Numbers ( NSNumber/NSDecimalNumber )
- Dates ( NSDate )
- URLs ( NSURL )
$ Interface Classes
Part of what makes the iPhone and iPad such fun to use are the onscreen touch interfaces that
you can create. As we explore Xcode’s IB in the next hour, you’ll get your first hands-on experi-
ence with some of these interface classes. Something to keep in mind as you read through this
section is that many UI objects can take on very different visual appearance based on how they
are configured—so there is quite a bit of flexibility in your presentation.
- Labels ( UILabel )
- Buttons ( UIButton )
- Switches ( UISwitch )
- Segmented Control ( UISegmentedControl )
- Sliders ( UISlider )
- Steppers ( UIStepper )
- Text Fields ( UITextField/UITextView )
- Pickers ( UIDatePicker/UIPicker )
- Popovers ( UIPopoverController)
--------------------------------------------------------------------------------------------
자세한 내용은 애플 개발자 싸이트에서 Cocoa Fundamentals Guide 에 대한 설명을 읽어보길 바란다.