如何将动画系列添加到我的 iPhone 应用程序中?
我试图将 GIF 放入我的 iPhone 应用程序中,但它只显示了第一帧。我读到您必须使用 UIimageView 将此编码放入我的应用程序中。
UIImage *blur5 = [UIImage imageNamed:@"Picture 12.jpg"];
UIImage *blur6 = [UIImage imageNamed:@"Picture 13.jpg"];
self.imageView.animationImages = [[NSArray alloc] initWithObjects:blur5, blur6, nil];
self.imageView.animationRepeatCount = 2;
[self.imageView startAnimating];
但具体在哪里以及如何进行呢?每次我尝试运行它时,都会出现错误并且 Xcode 冻结。
I was trying to put a GIF into my iphone app, but it just showed the first frame. I read that you have to put this coding into my app with a UIimageView.
UIImage *blur5 = [UIImage imageNamed:@"Picture 12.jpg"];
UIImage *blur6 = [UIImage imageNamed:@"Picture 13.jpg"];
self.imageView.animationImages = [[NSArray alloc] initWithObjects:blur5, blur6, nil];
self.imageView.animationRepeatCount = 2;
[self.imageView startAnimating];
But exactly where and how do I do it? Every time I try to run it, it gives me errors and Xcode freezes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论