UISlider
スライダークラス
継承 | UIControl : UIView : UIResponder : NSObject |
準拠 | NSCoding |
NSCoding (UIView) | |
UIAppearance (UIView) | |
UIAppearanceContainer (UIView) | |
NSObject (NSObject) | |
フレームワーク | /System/Library/Frameworks/UIKit.framework |
使用可能 | iOS 2.0 以降 |
定義 | UISlider.h |
概要
UISliderオブジェクトは連続した値の範囲からの単一の値を選択するのに使うビジュアルコントロールです。
スライダーは垂直または水平のバーとして表示できます。
インジケーター、サム、スライダーの現在の値セッティングを変更する事ユーザーによって動かすことができます。
例文
//スライダー UISlider *aSlider = [[UISlider alloc] initWithFrame:CGRectMake(0,120,320,100)]; [aSlider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged]; aSlider.continuous = YES;
メソッドとプロパティ
スライダー値へのアクセス
value property
–setValue:animated
スライダーの制限値へのアクセス
minimumValue property
maximumValue property
スライダーの挙動を集成します
continuous property
スライダーのアピアランスを変更します
minimumValueImage property
maximumValueImage property
currentMinimumTrackImage property
– minimumTrackImageForState
– setMinimumTrackImage:forStatescurrentMaximumTrackImage property
– maximumTrackImageForState:
– setMaximumTrackImage:forStates
currentThumbImage property
– thumbImageForState– setThumbImage:forStates