Changes

A watchOS 2 WatchKit Notification Tutorial

189 bytes added, 20:02, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_WATCHOS2watchos2</googlehtmlet>
[[Image:watchkit_notification_ios_ui2.png]]
Figure 33-1
[[Image:watchkit_notify_constraints.png]]
Figure 33-2
When the notification is triggered, the user is to be given the option of repeating the notification using the same delay. This will involve the addition of a notification action to the notification using the “REMINDER_CATEGORY” identifier referenced each time the notification is set. The code to configure the action will be placed within the Application Delegate class within the didFinishLaunchingWithOptions method.
<googlehtmlet>BUY_WATCHOS2watchos2</googlehtmlet>
Begin by locating and selecting the AppDelegate.swift file and modifying the didFinishLaunchingWithOptions method to create the notification action as follows:
[[Image:watchkit_ios_app_alert2.png]]
Figure 33-3
[[Image:watchkit_notification_image_set.png]]
Figure 33-4
[[Image:Examplewatchkit_long_look_notification.jpgpng]]
Figure 33-5
[[Image:Examplewatchkit_notification_center.jpgpng]]
Figure 33-6
<googlehtmlet>BUY_WATCHOS2watchos2</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">