How do I set the title for the current view in my watch kit (swift) app programmatically?
You can set the title on the current Interface Controller, not a View. You just need to call setTitle()
on the Interface Controller itself.
One feasible method, where you can set the title for your controller is the awake(withContext:)
function.
class WatchController: WKInterfaceController {
override func awake(withContext context: Any?) {
self.setTitle("Title")
}
}