IOS_5 _ Tom, ios_5 Tom
Finally:
BeyondViewController. h
//// BeyondViewController. h // 05_TomCat // Created by beyond on 14-7-23. // Copyright (c) 2014 com. beyond. all rights reserved. // # import <UIKit/UIKit. h> @ interface BeyondViewController: UIViewController @ property (weak, nonatomic) IBOutlet UIImageView * imgView_tom;-(IBAction) btnClick :( UIButton *) sender; @ end
BeyondViewController. m
//// BeyondViewController. m // 05_TomCat // Created by beyond on 14-7-23. // Copyright (c) 2014 com. beyond. all rights reserved. // # import "BeyondViewController. h "@ interface BeyondViewController () {NSDictionary * _ dict;} @ end @ implementation BeyondViewController-(void) viewDidLoad {[super viewDidLoad]; // sg_bundle template code, 1, get. MAIN package of the app; 2. Return the full fullPath of a file in the main package. NSBundle * mainBundle = [NSBundle mainBundle]; NSString * fullPath = [mainBundle pathForResource: @ "tom. plist "ofType: nil]; _ dict = [NSDictionary dictionaryWithContentsOfFile: fullPath];}-(IBAction) btnClick :( UIButton *) sender {// If the animation is in progress, if ([_ imgView_tom isAnimating]) {return ;}// the text above the button is the dictionary key, the value-1 indicates the number of animated images. // NSString * text = sender. titleLabel. text; NSString * text = [sender titleForState: UIControlStateNormal]; int * picNum = [_ dict [text] intValue]; NSLog (@ "% @ ---- % d", text, picNum); // call the custom method to play the animation [self playAnimatitonNamed: text picNumber: picNum];}-(void) playAnimatitonNamed :( NSString *) name picNumber :( int) picNum {// instantiate a variable array NSMutableArray * array = [NSMutableArray array]; // Add a UIImage for a variable array (int I = 0; I <picNum; I ++) {// method 1 for generating an image. The resident memory is overloaded. The NSString * fullName = [NSString stringWithFormat: @ "@@_%02d.jpg", name, I] is broken down. UIImage * img = [UIImage imageNamed: fullName]; // method 2 for generating an image. IO reads the full path and releases the image when it is used up, no memory resident // NSString * fullPath = [[NSBundle mainBundle] pathForResource: fullName ofType: nil]; // UIImage * img2 = [[UIImage alloc] initWithContentsOfFile: fullPath]; // Add the UIImage to the array [array addObject: img];} // set the UIImageView Animation Parameters and submit the animation _ imgView_tom.animationImages = array; _ imgView_tom.animationDuration = 0.1 * picNum; _ imgView_tom.animationRepeatCount = 1; [_ imgView_tom startAnimating];} @ end
The talking Tom Cat version 15 cannot be installed on the iphone.
IPHONG 3G? 3GS? 4?
Os3.x? OS4?
Tom concert for cats and mice
Tom sang the song "give way to busy people", excerpted from the opera "the hairdresser of Sevilla" and rosiny.
I saw it.
Reference: myself