Daily Archives: 2014年8月2日

iOS开发中创建简易计时器使用

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_序号-[email protected] // iPhone5及iPhone5C、iPhone5S

如:

1
2
3
4
5
6
7
8
9
  new_feature_1.png
  [email protected]
  new_feature_1-[email protected]
  new_feature_2.png
  [email protected]
  new_feature_2-[email protected]
  new_feature_3.png
  [email protected] 
  new_feature_3-[email protected]

3、文件名自动识别

3.1、增加两个Category[……]

继续阅读