In the previous sections, we successfully created our NotificationController
class that will be used to display the selected shopping list item within our notification. Our next step is to create the Outlets for our shopping list item name as well as the associated order information. Perform the following steps:
Open the Assistant Editor window by navigating to Navigate | Open in Assistant Editor or pressing Option + Command + ,.
Ensure that the
NotificationController.swift
file is displayed within the Assistant Editor window, as shown in the following screenshot:Next, select the ReceiptLabel (
WKInterfaceLabel
) control, then hold down the Control key, and drag it into theNotificationController.swift
file within the body ofclass NotificationController: WKInterfaceController
.Choose Outlet from the Connection drop-down menu for the type of connection to create and enter
receiptLabel
for the name of the Outlet property to create.Next, select...