摘要:
#import "ViewController.h" /** 加载图片的方式: 1. imageNamed: 2. imageWithContentsOfFile: 1. 加载Assets.xcassets这里面的图片: 1> 打包后变成Assets.car 2> 拿不到路径 3> 只能通过imageNamed:来加载图片 4> 不能... 阅读全文
摘要:
#pragma mark - 开始动画 - (IBAction)startAnimation { // 1.1 加载所有的图片 NSMutableArray *imageArr = [NSMutableArray array]; for (int i=0; i<20; i++) { // 获取图片的名称 NSString *imageNam... 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; /* // 设置frame的方式 // 方式一 UIImageView *imageView = [[UIImageView alloc] init]; imageView.image = [UIImage imageNamed:@"1"]; ... 阅读全文
摘要:
// 1.创建UIImageView对象 UIImageView *imageView = [[UIImageView alloc] init]; // 2. 设置尺寸 // imageView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); ... 阅读全文