Posts

Post marked as solved
2 Replies
0 Views
Looks like this may have been a bug with MacOS 13. After going into Settings > General > Language & Region, and setting Temperature units to C and then back to F, it works just fine.
Post marked as solved
2 Replies
0 Views
Thanks for helping Claude, the code there actually also shows the value in addition to the ° symbol. The .narrow just takes away the localized label, i.e. "F or C". taking out the .narrow would write 99°F for instance. Taking away the .formatted() option leaves the raw NSMeasurement object. You can add .description to the end of the temperature, and it will return the value in Celsius, but this description cannot be formatted from what I can find. Which is what led me to the code below. Hope that helps. Thanks again. The full code to write that text is Text("\(weather.currentWeather.temperature.formatted(.measurement(width: .narrow)))") .font(.system(.largeTitle, design: .rounded)) .fontWeight(.bold) .foregroundColor(Color.white)
Post marked as Apple Recommended
0 Views
I have also been wondering about this, furthermore, I am also not able to get uvIndex to work either. Sorry I don't have a fix, just sharing that I too am experiencing this issue.