gpt4 book ai didi

iphone - 如何将 UILocatNotification 设置为每天早上 9 点触发

转载 作者:行者123 更新时间:2023-11-28 23:16:41 24 4
gpt4 key购买 nike

我需要将 UILocatNotification 设置为每天上午 9 点触发。任何帮助将不胜感激。

最佳答案

[formatter setDateFormat:[NSDateFormatter dateFormatFromTemplate:@"yyyy-MM-dd HH:mm:ss" 
options:0
locale:nil]];
[formatter setTimeZone:[NSTimeZone localTimeZone]];

notification.fireDate = [formatter dateFromString:@"2010-10-21 09:00:00"];
notification.repeatInterval = NSDayCalendarUnit;

关于iphone - 如何将 UILocatNotification 设置为每天早上 9 点触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6078964/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com