UIStepper
3733 단어 UI
1 #import "AppDelegate.h"
2
3 @interface AppDelegate () 4
5 @end
6
7 @implementation AppDelegate 8
9
10 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 11 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 12 // Override point for customization after application launch.
13 self.window.backgroundColor = [UIColor whiteColor]; 14
15 UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; 16 stepper.minimumValue = 0; 17 stepper.maximumValue = 100; 18 stepper.value = 50; 19 [stepper addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; 20
21 [self.window addSubview:stepper]; 22 [self.window makeKeyAndVisible]; 23 return YES; 24 } 25
26 - (void)valueChanged:(UIStepper *)sender 27 { 28 NSLog(@"Value = %.0f",sender.value); 29 } 30
31
32 @end
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Application Development in WebOSDevelop applications in WebOS Recognize the abstract class Application The operating system accepts classes that impleme...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.