Setting a title in the top right of a modally presented interface in WatchOS

93 Views Asked by At

Is it possible to do this? As far as I know the setTitle() method just allows you to change the text of the top left "Cancel" text.

1

There are 1 best solutions below

0
On

No, you can't.


All the WKInterfaceObject and WKInterfaceController are just proxy objects to send queries to real UI Object. It's huge different with UIView and UIViewController in iOS.

Storyboard bundle is separated with extension bundle. So, in sand-box concept, you can't access real UI Object directly with extension context. The connection between proxies and real UI Objects are managed by watchOS itself.

As a result, What if there is no query API or interface builder option, There is no way to react or change real UI Objects by code in extension bundle.