Ios8 notification in swift
AppDelegate. swift
ViewController. swift
Run and press command + L/command + H to bring the simulator to the screen lock/main screen. The effect is as follows:
The following processes the click events of First Action and Second Action: <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + u7nkx9rjxbwrgvszwdhdguuc3dpzntw0kospc9wpgo8cd48aw1nihnyyz0 = "http://www.2cto.com/uploadfile/Collfiles/20140912/20140912090559134.png" alt = "\">
Then, receive and process the notification in ViewController. swift,
You can see the specific effect by running it yourself. It will not be posted here.
In addition, in the simulator Settings-> Notifications-> you can set the notification pop-up style, you can select three styles (run the program first and then you can see the Notifications option in Settings)
.