Talking Tom Source Code
来源:互联网 发布:js打开无导航栏新窗口 编辑:程序博客网 时间:2024/05/21 23:01
Talking Tom
- (void)runAnimationWithCount:(int)count name:(NSString *)name
{
if (self.tom.isAnimating)return;
// 1.加载所有的动画图片
NSMutableArray *images = [NSMutableArrayarray];
for (int i =0; i<count; i++) {
// 计算文件名
NSString *filename = [NSStringstringWithFormat:@"%@_%02d.jpg", name, i];
// 加载图片
// imageNamed: 有缓存(传入文件名)
// UIImage *image = [UIImage imageNamed:filename];
// imageWithContentsOfFile: 没有缓存(传入文件的全路径)
NSBundle *bundle = [NSBundlemainBundle];
NSString *path = [bundle pathForResource:filename ofType:nil];
UIImage *image = [UIImageimageWithContentsOfFile:path];
// 添加图片到数组中
[imagesaddObject:image];
}
self.tom.animationImages = images;
// 2.设置播放次数(1次)
self.tom.animationRepeatCount =1;
// 3.设置播放时间
self.tom.animationDuration = images.count * 0.05;
[self.tomstartAnimating];
// 4.动画放完1秒后清除内存
CGFloat delay =self.tom.animationDuration +1.0;
[self.tomperformSelector:@selector(setAnimationImages:)withObject:nilafterDelay:delay];
// [self performSelector:@selector(clearCache) withObject:nil afterDelay:delay];
}
- Talking Tom Source Code
- talking tom cat 如何实现的
- source code
- source code
- source code
- source code
- source insight使用技巧-宏,颜色.tom
- 如何像talking tom那样,自动监听到外部声音,和,简单的变声_1
- 如何像talking tom那样,自动监听到外部声音,和,简单的变声_2
- 如何像talking tom那样,自动监听到外部声音,和,简单的变声_3
- Tom
- Tom
- Source Code of exe2com.
- Source Code of exe2com
- HookAPI source code
- Source code of CIH
- Microsoft CLI source code
- PHPfileNavigator source code
- 打包DMG镜像
- Feedforward Neural Network Language Model(NNLM)原理及数学推导
- Path Sum
- 【C#】Binomial model option定价
- Find Median from Data Stream
- Talking Tom Source Code
- LeetCode-Maximum Depth of Binary Tree
- spring MVC环境搭建
- 在cocos2d-js实现自动绑定cocostudioUI控件与事件(三)
- spring mvc上传、下载的实现
- 【Java】利用Java对配置文件操作实现Java程序的国际化
- [Leetcode]Longest Consecutive Sequence
- UVA - 10891(sum游戏,dp)
- 嵌入式linux学习笔记一--打补丁