(이미지 출처: http://starpl.com/jidolstar/11333156 )
UISegmentedControl Class Reference
Overview
A UISegmentedControl
object is a horizontal control made of multiple segments, each segment functioning as a discrete button. A segmented control affords a compact means to group together a number of controls.
A segmented control can display a title (an NSString
object) or an image (UIImage
object). The UISegmentedControl
object automatically resizes segments to fit proportionally within their superview unless they have a specific width set. When you add and remove segments, you can request that the action be animated with sliding and fading effects.
You register the target-action methods for a segmented control using the UIControlEventValueChanged
constant as shown below.
[segmentedControl addTarget:self |
action:@selector(action:) |
forControlEvents:UIControlEventValueChanged]; |
How you configure a segmented control can affect its display behavior:
If you set a segmented control to have a momentary style, a segment doesn’t show itself as selected (blue background) when the user touches it. The disclosure button is always momentary and doesn’t affect the actual selection.
In versions of iOS prior to 3.0, if a segmented control has only two segments, then it behaves like a switch—tapping the currently-selected segment causes the other segment to be selected. On iOS 3.0 and later, tapping the currently-selected segment does not cause the other segment to be selected.
'메모 > 아이폰 IOS' 카테고리의 다른 글
[IOS] 코코아 터치란 무엇인가? - 01 (0) | 2013.02.03 |
---|---|
[eBook] 해외에서 IOS6 관련 서적 구매 (0) | 2013.02.03 |
[IOS] Immutable, Mutable 클래스의 차이 (298) | 2013.02.03 |
아이폰 중급 커리큘럼 (441) | 2013.02.03 |
아이폰 초급 커리큘럼 (427) | 2013.02.03 |