Naughty Tom Cat

Naughty Tom Cat

Source code introduction: The cute Tom cat can perform funny actions such as eating breakfast and yawning.

Source code effect:

Source code snippet:

  1. -( void )btnClick:(UIButton *)button
  2. {
  3. if (button.tag == 1 ) {
  4. NSMutableArray *arrM=[[NSMutableArray alloc] init];
  5. for (NSInteger i= 0 ; i< 12 ; i++) {
  6. NSString *name=[NSString stringWithFormat:@ "cat_cymbal00%02ld.jpg" ,i];
  7. [arrM addObject:[UIImage imageNamed:name]];
  8. }
  9.           
  10. imageView.animationImages=arrM;
  11. imageView.animationDuration= 3.0 ;
  12. imageView.animationRepeatCount= 1 ;
  13. [imageView startAnimating];
  14.           
  15. [self performSelector: @selector (playSoundWithFileName:) withObject:@ "cymbal" afterDelay: 0.5 ];
  16.           
  17. } else   if (button.tag == 2 ){
  18. NSMutableArray *arrM=[[NSMutableArray alloc] init];
  19. for (NSInteger i= 0 ; i< 27 ; i++) {
  20. NSString *name=[NSString stringWithFormat:@ "cat_fart00%02ld.jpg" ,i];
  21. [arrM addObject:[UIImage imageNamed:name]];
  22. }
  23.           
  24. imageView.animationImages=arrM;
  25. imageView.animationDuration= 5.0 ;
  26. imageView.animationRepeatCount= 1 ;
  27. [imageView startAnimating];
  28.           
  29. [self performSelector: @selector (playSoundWithFileName:) withObject:@ "fart003_11025" afterDelay: 0.6 ];
  30. } else   if (button.tag == 3 ){
  31. NSMutableArray *arrM=[[NSMutableArray alloc] init];
  32. for (NSInteger i= 0 ; i< 39 ; i++) {
  33. NSString *name=[NSString stringWithFormat:@ "cat_eat00%02ld.jpg" ,i];
  34. [arrM addObject:[UIImage imageNamed:name]];
  35. }
  36. imageView.animationImages=arrM;
  37. imageView.animationDuration= 3.0 ;
  38. imageView.animationRepeatCount= 1 ;
  39. [imageView startAnimating];
  40. [self performSelector: @selector (playSoundWithFileName:) withObject:@ "p_eat" afterDelay: 0.5 ];
  41. }

Download address: http://download..com/data/2111751

<<:  High imitation Baidu Nuomi

>>:  Baidu's multiple apps have vulnerabilities, Wuyun claims it can remotely control Android devices

Recommend

Give this "cosmic rose" to the person in your heart!

|||| Written by reporter Ding Lin New Media Edito...

Tik Tok marketing and promotion, 6 steps to make money with Tik Tok account!

Now many brand companies have realized the huge m...

It’s quiet now. Alipay has cracked down on pop-up ads, reducing them by 70%.

[[406905]] As a national-level APP, Alipay has br...

Use these 6 tips to make users want to buy your product

Some time ago, I saw that another restaurant near...

Labor Day is coming, here are ten sentences

May Day is coming, and the short holiday is comin...

What kind of river is the Tarim River? Learn more in this article →

“Tarim River, the river of my hometown, how many ...

Three ways and strategies of bringing goods to new media Douyin

5,000 orders of Shiseido red kidneys in 3 minutes...

Lao Liang's Value Investment Stock Selection Course

Introduction to Lao Liang's Value Investment ...

Collection | 12 major overseas app promotion methods

This year is still a hot year for going overseas....

Tutorial on Massive Engine Delivery | Delivery Positions and Traffic Audiences

Today I will introduce to you the various placeme...

2019 Google keyword search advertising skills

In fact, there are skills to optimize the number ...

IPTV encounters OTT. Why are Cable TV and China Unicom still fighting over 3568?

Many Chinese people seem to believe that money ca...

Tencent Weibo Xiaoqingxin client source code download

Functional category: Social Supported platforms: ...