YIem`s Blog -心比天高命比纸薄-链接找不到的请在站内搜索内容!

2015-12-15- iOS UI 实现TOM猫


//
// RootViewController.m
// Tom
//
// Created by YIem on 15/12/11.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import "RootViewController.h"

@interface RootViewController ()
@property (nonatomic, retain)UIImageView *imgTom1;
@end

@implementation RootViewController

//[self TOM1];
// [self TOMtu1];


// 按钮
[self an1];
[self an2];
[self an3];
[self an1_1];
[self an2_1];
[self an3_1];
// 隐藏按钮
[self anto];
[self anzhon];
[self anxiao];
[self anfootLeft];
[self anfootRight];

}
// 图标按钮123456

}

// 隐藏按钮

{

UIButton *anfootLeft = [UIButton buttonWithType:UIButtonTypeSystem];
anfootLeft.frame = CGRectMake(140, 610, 35, 35);

// anfootLeft.backgroundColor = [UIColor yellowColor];

[anfootLeft addTarget:self action:@selector(anright) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:anfootLeft];

}

// TOM 动画

// self.imgTom1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.height)];
// self.imgTom1.image = [UIImage imageNamed:@"eat_0.jpg"];
// [self.view addSubview:self.imgTom1];
// [_imgTom1 release];

NSMutableArray *imgTomArr1 = [NSMutableArray array];
for (NSInteger i = 0; i  < 39; i++) {

// NSString *nameTom = [NSString stringWithFormat:@"eat_%ld", i];
// NSString *pathTom = [[NSBundle mainBundle]pathForResource:nameTom ofType:@"jpg"];
// UIImage *imgTom = [UIImage imageWithContentsOfFile:pathTom];
// [imgTomArr1 addObject:imgTom];

    
    [imgTomArr1 addObject:[UIImage imageNamed:[NSString stringWithFormat:@"eat_%ld.jpg",i]]];
}
self.imgTom1.animationDuration = 4;
self.imgTom1.animationImages = imgTomArr1;
self.imgTom1.animationRepeatCount = 1;
[self.imgTom1 startAnimating];

}

// 隐藏点击动画

/*

pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation

*/

@end

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »