-2

Any ideas how to apply a red dot to the iPhone App icon - like the Mail or Messages' Icon with the number of unread messages in it?

enter image description here

Edward Hasted
  • 3,201
  • 8
  • 30
  • 48
  • Local notifications, using badges – Mr. Xcoder Sep 01 '16 at 17:05
  • A dozen of tutorials online.. – Mr. Xcoder Sep 01 '16 at 17:06
  • Or this one for Swift: http://stackoverflow.com/questions/28011118/add-badge-to-app-icon-in-ios-8-with-swift. – Martin R Sep 01 '16 at 17:12
  • Many thanks - I was search under Red Dot rather than Badge or Notification. Thanks. – Edward Hasted Sep 01 '16 at 17:30
  • Used this code: // Set Noticification Level on App Icon Badge Number let settings = UIUserNotificationSettings(forTypes: UIUserNotificationType.Badge, categories: nil) UIApplication.sharedApplication().registerUserNotificationSettings(settings) UIApplication.sharedApplication().applicationIconBadgeNumber = 123 – Edward Hasted Sep 01 '16 at 17:49

1 Answers1

1

Try this:

Swift 2:

 UIApplication.sharedApplication().applicationIconBadgeNumber = 1// or you value

Hope this helps!

Mr. Xcoder
  • 4,719
  • 5
  • 26
  • 44