c语言数组初体验,第01天C语言(01):iOS初体验

//

// ViewController.m

// iOS体验

//

// Created by liyuhong165 on 17/6/23.

// Copyright © 2017年 lyh. All rights reserved.

//

#import "ViewController.h"

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIImageView *img;

@end

@implementation ViewController

#pragma mark 1.打电话、发短信(需要真机测试)

/*

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

NSURL *url = [NSURL URLWithString:@"tel://10010"]; // sms 发短信

[[UIApplication sharedApplication] openURL:url];

}

*/

#pragma mark 2.过度动画

/*

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

// 创建一个多度动画

CATransition *anima = [CATransition animation];

// 设置动画类型

anima.type = @"cube";

// 设置动画时间

anima.duration = 5;

// 添加动画

[self.view.layer addAnimation:anima forKey:nil];

}

*/

#pragma mark 3.全景动画

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

// 1.将所有的图片保存起来

NSMutableArray *arrM = [NSMutableArray array];

for(int i = 1;i < 36;i++)

{

// 拼接所有图片名称

NSString *name = [NSString stringWithFormat:@"img_360car_black_%02d",i];

[arrM addObject:[UIImage imageNamed:name]];

}

// 2.将图片设置给图片容器

self.img.animationImages = arrM;

self.img.animationDuration = 5;

self.img.animationRepeatCount = 1;

// 3.执行动画

[self.img startAnimating];

}

@end

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值