@property(nonatomic,copy)NSArray *animationImages;

需要播放的序列图片数组(里面都是UIImage对象,会按顺序显示里面的图片)

@property(nonatomic)NSTimeInterval animationDuration;

帧动画的持续时间

@property(nonatomic)NSInteger animationRepeatCount;

帧动画的执行次数(默认是无限循环)

- (void)startAnimating;

开始执行动画

- (void)stopAnimating;

停止执行帧动画

- (BOOL)isAnimating;

判断是否正在执行动画

 

 

UIImage的两种加载方式

方式1:有缓存(图片所占用的内存一直停留在程序中)

>+ (UIImage *)imageNamed:(NSString *)name;

其中name时图片的文件名

方式2:无缓存(图片所占用的内存会在一些特定的操作后背清除)

> + (UIImage *)imageWithContentOfFile:(NSString *)path;

> - (id)initWithContentsOfFile:(NSSString *)path;

其中path是图片的全路径

ps:全路径有NSBundle 获取

相关文章:

  • 2021-07-15
  • 2021-12-22
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-03-04
相关资源
相似解决方案