watchkit - Customise title in the WK Status Bar -


i'm trying customise title in wk status bar of first controller.

enter image description here

the correct way should this:

public func settitle(title: string?) // title of controller. displayed when controller active 

so

wkinterfacecontroller.settitle("my title") 

but using code, xcode says cannot convert value of type 'string' expected argument type 'wkinterfacecontroller'. what's wrong?

settitle instance method, not class method.

you need refer specific instance controller change controller's title. since setting first controller's title within own code, can omit self, , call

settitle("my title") 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -