iOS Tom-猫实现方法

 #import "ViewController.h"

 @interface ViewController ()
 @property (weak, nonatomic) IBOutlet UIImageView *tom;//tom图片

 - (IBAction)eat;//吃小鸟
 - (IBAction)fart;//放屁
 - (IBAction)drink;//和牛奶
 - (IBAction)scratch;//划玻璃
 - (IBAction)pie;//扔东西
 - (IBAction)cymbal;//敲锣

 - (IBAction)knock;//敲头
 - (IBAction)left;//左脚
 - (IBAction)right;//右脚

 - (IBAction)Angry;//生气
 - (IBAction)Stomach;//胃口
 @end

 @implementation ViewController
 -(BOOL)prefersStatusBarHidden
 {
return YES;
 }
 - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
 }

 - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
 }
 -(void)initWithdonghua:(NSString *)name andcount:(int)cuont
 {
if (self.tom.isAnimating) {
    return;
}
NSMutableArray *arrM=[NSMutableArray array];
for (int i=0; i
iOS Tom-猫实现方法_第1张图片
屏幕快照 2016-03-05 05.59.04 PM.png
iOS Tom-猫实现方法_第2张图片
屏幕快照 2016-03-05 06.04.59 PM.png
iOS Tom-猫实现方法_第3张图片
屏幕快照 2016-03-05 06.05.53 PM.png

你可能感兴趣的:(iOS Tom-猫实现方法)