开发者

Loading an image sequence in InterfaceBuilder -ObjectiveC

开发者 https://www.devze.com 2023-01-01 13:43 出处:网络
Using Actionscript and or in the Flash IDE you can either instantiate bitmaps from the library, or simply import bitmaps into the timeline of a MovieClip to create an image sequence.

Using Actionscript and or in the Flash IDE you can either instantiate bitmaps from the library, or simply import bitmaps into the timeline of a MovieClip to create an image sequence.

How would you do the same thing in开发者_如何学C InterfaceBuilder and-or using ObjectiveC? Do I need to create a new view for each and every image?


You could store them in an array. Something like so:

NSMutableArray *_imageArray = [NSMutableArray array];   //or you can alloc-init if needed
UIImage *_firstImage = [UIImage imageNamed:@"image1.png"];
UIImage *_secondImage = [UIImage imageNamed:@"rambo.png"];
etc...

[_imageArray addObject:_firstImage];
[_imageArray addObject:_secondImage];

And then go through them in a NSTimer loop or something similar. Hope it helps

0

精彩评论

暂无评论...
验证码 换一张
取 消