ios数字钟的实现
数字钟的创建,我们首先的准备一些参数:代码如下:
#import "AppDelegate.h"
@implementation AppDelegate
{
UILabel * _yearLabel;
UILabel * _monthLabel;
UILabel * _dayLabel;
UILabel * _hourLabel;
UILabel * _minuteLabel;
UILabel * _secondLabel;
NSMutableArray * _dateArray;
NSTimer * _timer;
}
然后,我们创建数字钟的显示界面:代码如下
1.创建一个数组,用来存放,年,月,日,时,分,秒
-(void)prepareDataArray
{
_dateArray = [[NSMutable