ios的文字滚动
来源:互联网 发布:淘宝开店注册账号 编辑:程序博客网 时间:2024/04/29 19:19
@property (weak,nonatomic) IBOutletUILabel *textNameLabel;
@property (nonatomic,strong)NSMutableArray *textArray;
@end
@implementation ViewController
- (void)viewDidLoad {
[superviewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
CALayer *subLayer = [CALayerlayer];
[subLayer setBounds:CGRectMake(0,0, 200,200)];
[subLayer setPosition:CGPointMake(100,100)];
[subLayer setBackgroundColor:[UIColorredColor].CGColor];
[self.view.layeraddSublayer:subLayer];
self.textArray = [NSMutableArrayarrayWithObjects:@"他就会很健康很好",@"海陆空艰苦奋斗了",@"sggsffgs",@"这个减肥的空间",nil];
}
//改变文字
- (IBAction)changeTestAction:(UIButton *)sender {
staticint i=0;
if (i==3) {
i=0;
}else
{
i++;
}
self.textNameLabel.text =self.textArray[i];
CATransition *transition = [[CATransitionalloc] init];
transition.type =@"push";
transition.subtype =kCATransitionFromTop;
transition.duration=0.1;
[self.textNameLabel.layeraddAnimation:transition forKey:nil];
}
- (void)didReceiveMemoryWarning {
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
- ios的文字滚动
- iOS-文字滚动的Label
- iOS文字上下滚动效果的实现
- 状态栏文字的滚动
- 滚动的文字流
- js1:滚动的文字
- 滚动的文字js
- 上下滚动的文字
- 文字的向上滚动
- 滚动的文字
- 滚动条-可滚动文字的窗口
- IOS实现文字水平无间断滚动
- 文字横向滚动的实现
- 首尾相接的文字滚动
- 文字滚动的技术实现
- 文字滚动的技术实现
- 滚动文字的实现js
- JavaScrpt文字滚动的效果
- IO - 同步,异步,阻塞,非阻塞
- Tautology
- Log4j使用教程
- c!!#!!W!!M!!I类!!中!!常!!!用的!!查!!询!!!语!句及说明
- Wampserver配置端口出错
- ios的文字滚动
- POJ 1080Human Gene Functions
- 一些linux的基本操作指令
- 常用开发环境配置问题
- ComponentName的使用及相关介绍
- yii在区间搜索
- caffe中所有Layer都不进行backward的BUG
- 爬虫学习
- NOIp知识点【转自DQS学长】