ios - 当应用程序在后台运行时显示 UIAlert?
<p><pre><code>UIAlertView *alertView = [ initWithTitle:@"open app" message:@" backgr..." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
;
</code></pre>
<p>应用程序在后台运行时如何显示警报?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>使用 <a href="http://developer.apple.com/library/ios/#documentation/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html" rel="noreferrer noopener nofollow"><code>UILocalNotification</code></a>当您的应用在后台时。</p>
<pre><code>UILocalNotification *notification = [ init];
notification.alertBody = @"Your message";
notification.alertAction = @"Open app";
[ presentLocalNotificationNow:notification];
</code></pre></p>
<p style="font-size: 20px;">关于ios - 当应用程序在后台运行时显示 UIAlert?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/15702730/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/15702730/
</a>
</p>
页:
[1]