IOS getLocationTime--

来源:互联网 发布:网络时间同步服务器ip 编辑:程序博客网 时间:2024/05/18 22:45
//获取时间字符串--HUD.detailsLabelText=[NSString stringWithFormat:@"%@",_currentDate.text];
-(void)updateLabel {    //获得系统日期    NSDate * senddate=[NSDate date];    NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];    [dateformatter setDateFormat:@"上次更新时间: YYYY年MM月dd日 HH:mm:ss"];    NSString * locationString=[dateformatter stringFromDate:senddate];    _currentDate.text=locationString;        [dateformatter release];}

原创粉丝点击