I'm trying to customise title in the WK Status Bar of my first Controller.
The correct way should be this:
public func setTitle(title: String?) // title of controller. displayed when controller active
so
WKInterfaceController.setTitle("my Title")
but using this code, xCode says Cannot convert value of type 'String' to expected argument type 'WKInterfaceController'
. What's wrong?
setTitle
is an instance method, not a class method.You need to refer to a specific instance controller to change that controller's title. Since you would generally be setting your first controller's title within its own code, you can omit self, and simply call