1、问题现象
- TableView上的按钮点击时出现高亮延时
- ScrollView上的按钮点击出现高亮延时
- TableViewCell上的按钮点击出现高亮延时
2、问题分析
2.1、这是一个响应顺序的问题,可能oc在多层事件处理时的一种机制,TableView继承自ScrollVie[……]
1、问题现象
2、问题分析
2.1、这是一个响应顺序的问题,可能oc在多层事件处理时的一种机制,TableView继承自ScrollVie[……]
1、创建计时器
1 2 | NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(calledMethods:) userInfo:nil repeats:YES]; // 每3秒调用[......]<p class="read-more"><a href="https://www.yusian.com/blog/project/2014/08/02/182451608.html">继续阅读</a></p> |
1、应用场景
新软件安装在第一次打开时都会有该软件或版本的介绍,在iOS中最经典的做法是搭建一个ScrollView分页展示
但考虑到iPhone4系统与iPhone5系统,屏幕适配如何更为科学简单是一门学问,以下提供一个参考
2、图片命名
一般是三图片,Retina屏之前屏幕一套、iPhone4(4S)一套、iPhone5(5C/5S)一套
1 2 3 | xxx_序号.png // iPhone3GS及以前,可忽略 xxx_序号@2x.png // iPhone4及iPhone4S xxx_序号-568h@2x.png // iPhone5及iPhone5C、iPhone5S |
如:
1 2 3 4 5 6 7 8 9 | new_feature_1.png new_feature_1@2x.png new_feature_1-568h@2x.png new_feature_2.png new_feature_2@2x.png new_feature_2-568h@2x.png new_feature_3.png new_feature_3@2x.png new_feature_3-568h@2x.png |
3、文件名自动识别
3.1、增加两个Category[……]
1.创建UIlabel
1 | UILabel *label1 = [[UILabelalloc] initWithFrame:CGRectMake(20, 40, 280, 80)]; |
2.设置背景色
1 | label1.backgroundColor = [UIColor grayColor]; |
3.设置tag
1 | label1.tag = 91; |
4.设置标签文本
1 | label1.text = @"Hello world!"; |
5.设置标签文本字体和字体大小
1 | label1.font = [UIFont fontWithName:@"Arial" size:30]; |
6.设置文本对其方式
1 | label1.textAlignment = UITextAlignmentCenter; |
文本对齐方式有以下三种
1 2 3 4 5 6 7 8 | typedef enum { UITextAlignmentLeft = 0,左对齐 UITextAlignmentCenter,居中对齐 UITextAlignmentRight, 右对齐 } UITextAlignment; |
[……]