Author Topic: How can I change the title of the back button in a modal WatchKit scene?  (Read 7742 times)

kjmcneish

  • Administrator
  • *****
  • Posts: 719
    • View Profile
By default, a modal scene displays the text "Cancel" in its back button. To change this, set the Interface Controller's Title property in the Attributes Inspector to something else (for example, "Close").

As stated in the Apple WatchKit Programming Guide under "Interface Navigation":

The top-left corner of a modal interface displays the interface controllerís title string. When the user taps that string, WatchKit dismisses the modal interface. Set the title string to reflect the meaning of dismissing the modal interface. For example, when displaying information, you might set the string to Done or Close. If you do not specify a title for your interface controller, WatchKit displays the string Cancel by default.

All the best!
Kevin McNeish
Author of Learn to Code in Swift: https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11
« Last Edit: April 24, 2015, 04:19:34 PM by kjmcneish »