-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
Running OK:
- (void)mainThreadTimerDidFire:(MSWeakTimer *)timer {
NSAssert([NSThread isMainThread], @"This should be called from the main thread");
int ak = [self.label.text integerValue];
if(ak>255)
ak= 0;
self.label.text = [NSString stringWithFormat:@"%d", ak + 1];
int kaaaa = floor(ak%80);
UI *k = [oldMatrix objectAtIndex:kaaaa];
k.backgroundColor = [UIColor colorWithRed:ak%255/255 green:ak%255/255 blue:ak%255/255 alpha:ak/255.0f];
}
UIImageView not change image:
- (void)mainThreadTimerDidFire:(MSWeakTimer *)timer {
NSAssert([NSThread isMainThread], @"This should be called from the main thread");
int ak = [self.label.text integerValue];
if(ak>20)
ak= 0;
self.label.text = [NSString stringWithFormat:@"%d", ak + 1];
UI *k = [oldMatrix objectAtIndex:kaaaa];
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"balls-0-%d", kaaaa]];
k.image = image;
}
Note: oldMatrix: array of UIImageView
Metadata
Metadata
Assignees
Labels
No labels