0

Can someone explain me why it shows error here. I follow the tutorial, but maybe in swift 2, it doesn't true if typing like this.

enter image description here

Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116

2 Answers2

1

You are probably following tutorial from older version of Swift. Since its growing really fast, I suggest following the newest tutorials. In Swift 2 you should use collection, not | binary operator. Like:

[UIUserNotificationType.Sound, UIUserNotificationType.Badge]
sunshinejr
  • 4,834
  • 2
  • 22
  • 32
0

Your problem is with the first UIUserNotificationType, which is missing (I guess) the .Alert part.

jcaron
  • 17,302
  • 6
  • 32
  • 46