To get title there is function:
setTitle
But how to get title of WKInterfaceButton as string ?
I did not found anything in https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceButton_class/index.html
You can't get the state of any WKInterface UI element like buttons (WKInterfaceButton) label (WKInterfaceLabel) etc. I think this is designed by Apple like this because it involve under the hood communication between the extension running on your iOS device & the watch App. To save this overhead there are no getters and the extension should keep track of the state change (it is the one that can change the state).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With