私はランダムな値を作成する配列と配列を作成します。そして、ラベルに書く。私はNSTimerを追加しましたが、再度値を読み込むことはできません。私はtimer.Howでデータをリロードしたいと思います。
下のマイコード
NSArray *array = [NSArray arrayWithObjects:
[NSNumber numberWithInt:arc4random() % 100 * -1],
[NSNumber numberWithInt:arc4random() %(100) * -1],
[NSNumber numberWithInt:arc4random() %(100) * -1],
[NSNumber numberWithInt:arc4random() %(100)],
[NSNumber numberWithInt:arc4random() %(100)],
[NSNumber numberWithInt:arc4random() %(100)],
[NSNumber numberWithInt:arc4random() %(100)],
[NSNumber numberWithInt:arc4random() %(100)],
[NSNumber numberWithInt:arc4random() %(100)],
[NSNumber numberWithInt:arc4random() %(100)],nil];
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval: 5.0
target: self
selector:@selector(selectorSwitcher:)
userInfo: nil repeats:YES];
-(void)selectorSwitcher:(NSTimer *)timer {
[array removeAllObjects];
//Label
lblNumber.text= nil;
[createview setNeedsDisplay];
[myView setNeedsDisplay];
}