hi
i just found out that the native UIimageview has an animating function.
so instead of using a timer and loading images from an array we could use imageview.startanimating.
is it possible to access that function with nativobject?
http://www.appcoda.com/ios-programming-animation-uiimageview/
thanx
i just found out that the native UIimageview has an animating function.
so instead of using a timer and loading images from an array we could use imageview.startanimating.
is it possible to access that function with nativobject?
B4X:
// Load images
NSArray *imageNames = @[@"win_1.png", @"win_2.png", @"win_3.png", @"win_4.png",
@"win_5.png", @"win_6.png", @"win_7.png", @"win_8.png",
@"win_9.png", @"win_10.png", @"win_11.png", @"win_12.png",
@"win_13.png", @"win_14.png", @"win_15.png", @"win_16.png"];
NSMutableArray *images = [[NSMutableArray alloc] init];
for (int i = 0; i < imageNames.count; i++) {
[images addObject:[UIImage imageNamed:[imageNames objectAtIndex:i]]];
}
// Normal Animation
UIImageView *animationImageView = [[UIImageView alloc] initWithFrame:CGRectMake(60, 95, 86, 193)];
animationImageView.animationImages = images;
animationImageView.animationDuration = 0.5;
[self.view addSubview:animationImageView];
[animationImageView startAnimating];
http://www.appcoda.com/ios-programming-animation-uiimageview/
thanx
Last edited: