How to change notification type from Banner to Alert in iOS8?

前端 未结 1 455
别跟我提以往
别跟我提以往 2020-12-21 18:48

I\'m trying to create an app that delivers local notifications as an Alert, not a Banner. But looks like banner is the default and I can\'t find a way to change it on my cod

相关标签:
1条回答
  • 2020-12-21 19:26

    I don't believe there is any way to programmatically force the system to display your notification as an alert rather than as a banner. Looking over the documentation for UILocalNotification and for UIUserNotificationSettings, I don't see anything that would allow you to specify that you want an alert instead of a banner.

    It's up to the user to adjust their notification settings for your app - I would leave it to them to decide how they want to receive notifications.

    0 讨论(0)
提交回复
热议问题