A few different solutions / ideas:
I would make your WKInterfaceLabel
a property and synthesize it, then you are able to retrieve float values from your label just like you would with a regular UILabel
. I've successfully done this with no issues. I checked out the post that you linked and they said there is currently no way to retrieve the text values... I don't know if something was updated or not because I can retrieve float values, text values etc in WatchKit just fine. For retrieving or settingy code looks exactly like this:
(Declared privately in the .m)
@property (weak, nonatomic) IBOutlet WKInterfaceLabel *tempoLabel;
//
- (void)setTempoFromInteger {
self.tempoLabel.text = @"";
if (tempo > 0 && tempo < 999) {
NSString *tempoString = [NSString stringWithFormat:@"%i", tempo];
self.tempoLabel.text = tempoString;
}
}
Now if you're trying to just receive a random float value rather than create, you had to of retrieved or set that float value SOMEWHERE in your code or if retrieved from a server, somewhere in the data. Save that, and use it.