-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update UIImage of UIImageView fail #14
Comments
Would you mind sharing a little bit more of code? How is the timer being created? Thanks! |
Mind pasting the code here? I'd rather not download a zip file from a sketchy website. |
JaviSoto, you can see here: https://github.com/mrvandai/MSWeakTimerError Thank you! |
Any help? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running OK:
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:
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
The text was updated successfully, but these errors were encountered: