ios - 注册本地通知
<p><p>我正在开发一个带有 phonegap 的 IOS 应用程序,需要为其设置本地通知,该通知将在每个星期五和指定时间重复</p>
<p>还要求用户决定是否接收本地通知</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我建议您阅读以下关于我认为很有帮助的主题的文章</p>
<p> <a href="http://useyourloaf.com/blog/2010/7/31/adding-local-notifications-with-ios-4.html" rel="noreferrer noopener nofollow">http://useyourloaf.com/blog/2010/7/31/adding-local-notifications-with-ios-4.html</a> </p>
<pre><code>- (void)scheduleNotification {
[ cancelAllLocalNotifications];
UILocalNotification *notif = [ init];
notif.fireDate = ;
notif.timeZone = ;
notif.alertBody = @"Body";
notif.alertAction = @"AlertButtonCaption";
notif.soundName = UILocalNotificationDefaultSoundName;
notif.applicationIconBadgeNumber = 1;
[ scheduleLocalNotification:notif];
;
}
}
</code></pre>
<p>这只是其工作原理的基本概述,但从这里开始,您应该能够安排通知。</p></p>
<p style="font-size: 20px;">关于ios - 注册本地通知,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/9529590/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/9529590/
</a>
</p>
页:
[1]