开发者

UIAlertView Display while iPhone is asleep and locked

I am writing an app the is pretty much always going to be open (hardly ever would run in background) and I want to be able to alert the user with a 开发者_StackOverflowsound, vibrating the phone, and showing an alert message when there is a state change. The problem I am having is that when I use the UIAlertView, the AlertView seems to be hit or miss whether it plays the sound and/or vibrates. For example, sometimes it only alerts the user after the phone is unlocked. Is there a way that I can make the UIAlertView more aggressive?


In iOS 4, Push Notifications are no longer the only option.

You'll want to look into the UILocalNotification class. It provides similar functionality without having to setup/maintain a push notification server.

More information here: Local Notification Programming Guide.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜