0
我想向步進器添加一個動作以編程方式添加,但我不知道如何獲取單擊哪個步進器。我有一個NSMutableArray我更改值,但我想知道哪個步進器被點擊。這裏是我的代碼:以編程方式添加id步進器
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
for (int i = 0; i < count; i++) {
//Here I create the stepper
UIStepper *steperCode = [[UIStepper alloc] initWithFrame:CGRectMake(40, (i*30)+120, 300, 200)];
steperCode.maximumValue = 1000;
steperCode.minimumValue = 0;
steperCode.stepValue=1.0;
[self.view addSubview:steperCode];
}
非常感謝!
你是最好的!非常感謝 – asensionacher 2014-10-07 10:51:43
快樂的iCoding;) – raki 2014-10-07 11:19:22