永发信息网

xcode5 怎么在label里面显示今天的日期

答案:1  悬赏:60  手机版
解决时间 2021-04-04 03:43
  • 提问者网友:喧嚣尘世
  • 2021-04-03 19:52
xcode5 怎么在label里面显示今天的日期
最佳答案
  • 五星知识达人网友:雾月
  • 2021-04-03 20:12
NSDate * senddate=[NSDate date];
NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];
[dateformatter setDateFormat:@"YYYYMMdd"];
NSString * locationString=[dateformatter stringFromDate:senddate];
label.text = locationString;
就这么几句 页面添加label 不会么?
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯