当前位置:网站首页>Mastering the new functions of swiftui 4 weatherkit and swift charts

Mastering the new functions of swiftui 4 weatherkit and swift charts

2022-07-07 11:45:00 Knowledge fatness

SwiftUI 4 Mastering new functions WeatherKit and Swift Charts

In this year WWDC22 There are many exciting new frameworks and API Let's get involved . However , I am right. WeatherKit and Swift Charts Feel very excited , Because now we finally have the native of weather data and mapping data set 1 Party support .

In this paper , We will study how to combine the two to visualize our weather data . It's past the keynote speech 30 Hours , So remember , The code you see may change in the next few months . I also encountered some unsupported chart commands , These commands can cause fatal errors .

Swift Charts

image.png

So what is Swift Chart ? It is an easy and simple way to draw data in various chart styles ( As of this writing ; Pie chart is not supported 、 Radial diagram, etc ), It also supports all lovely accessibility functions 、 Animation, etc. .

in the past , I have to write my own charts or introduce 3rd Side dependencies to achieve this , even so , Accessibility features and animation are not fully considered .

Weather Kit

Apple As early as 2020 year 3 In June, the company acquired the popular Dark Sky Weather app , This makes developers wonder what will replace retired Dark Sky API, Now we have the official answer . Developers can now use native 、 Privacy centric solutions , Instead of relying on third-party providers .

Even in this early beta Stage , The document also shows API Very comprehensive , It covers a series of weather data 、 alert

原网站

版权声明
本文为[Knowledge fatness]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070945545955.html