0

我知道我必须将 uislider 值转换为 nsnumber 对象并将其存储在数组中,但是存储和加载值一段时间(例如 10 秒)所需的循环是什么?非常感谢

4

1 回答 1

0

好吧,你可以这样做:

 NSMutableArray *arrayWithSomeValues=[NSMutableArray array];
 // My options is the actual option from your slider. 
 [arrayWithSomeValues addObject:myOption];
 // ...
 // After adding everything you need
 // ...
 [self performSelector:@selector(switchValues:) withObject:arrayWithSomeValues afterDelay:10.0];

然后 switchValues 方法将接收您的数组,您可以在那里对它们做您想做的事情。

于 2012-05-03T20:01:06.777 回答