ios - 本地通知设置默认时间 9 :00 am for user timezone in iOS
<p><p>我想为每个用户时区时间设置通知<strong>默认上午 9:00</strong>。</p>
<p>如何为默认时间 <strong>9:00 am</strong> 创建 <strong>触发日期</strong>。 </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>你好,我知道了答案:-</p>
<pre><code>NSDate *pickerDate = ;
NSDateFormatter *dateFormatter = [init];
;
NSTimeZone *gmt = ;
;
NSCalendar *calendar = ;
NSDateComponents *timeComponents = [calendar components:( NSYearCalendarUnit | NSMonthCalendarUnit |NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit )
fromDate:pickerDate];
;
;
;
NSDate *dtFinal = ;
NSDateFormatter *formatter = [ init];
;
NSString *fierDate = ;
</code></pre></p>
<p style="font-size: 20px;">关于ios - 本地通知设置默认时间 9 :00 am for user timezone in iOS,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/30998833/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/30998833/
</a>
</p>
页:
[1]