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

Brand crisis public relations trends in 2021!

It has to be said that brand crisis public relati...

How much does it cost to join the Guiyang Office Supplies Mini Program?

There are two types of Guiyang office supplies mi...

up to date! Data rankings of 60 information flow advertising platforms!

Today I bring you the latest traffic rankings of ...

How to carry out KOL operation and promotion?

Introduction: The operation of KOLs needs to be e...

Six ways to use group analysis in life and mobile game operations

[[148080]] The grouping and classification remind...

A must-read list for operators in 2018! !

Unconsciously, 2017 has come to an end. What kind...

Kuaishou Search for Hidden Traffic Opportunities

When users' content consumption needs extend ...

Where do “super fungi” come from and where do they go?

Reviewer: Zhang Shuyuan, Chief Physician, Beijing...

NetQin takes off its safety helmet and builds a strong mobile business

April 10 (Reporter Lin Meibing) NetQin, which cla...