XDU_B-Test_Weather-Report

XDU_B-Test_Weather-Report

使用语言/环境/API

语言:Swift

环境:Xcode Version 14.3 (14E222b)/Simulator iPhone 14 Pro/实机 iPhone 7 Plus

API:和风天气

实现效果

屏幕上面一个蓝到紫的渐变色按钮,允许访问位置后按很多次就可以显示当前城市/最高温度最低温度/AQI

总而言之是一个十分简单的应用

选择空气很香甜的一天作为展示

使用须知

  1. 上传Xcodeproj结果是zip文件,需要运行时请解压
  2. 使用时请使用自己的Key替代
  3. 项目使用和风天气免费API,如果使用其他API替换或许不能正常运行/显示
  4. 项目运行后Simulator的定位为San Francisco,需要连接实机调试才能获取本地位置并获取天气/AQI
  5. 最新版本的Xcode的Simulator默认iOS版本较高,版本控制要求也默认为Simulator的版本。一般实机没有最高版本,需要去设置运行所需的最低版本以便实机运行
  6. 本项目使用于2023年XDU B测 雾霾探测系统设计,任何用途造成后果自负

特别感谢

OpenAI/ChatGPT

链接

https://dev.qweather.com

https://openai.com/blog/chatgpt

20230504 v2.0

New features

✅ Line chart of tempMax&tempMin for following 7 days

✅ Text description of weather conditions for day and night of the day (Chinese Simplified)

Todo

❎ I would like two line charts to be presented on one graph, which would be more intuitive. However, I am not very good at using swiftUI and ChatGPT yet, so there are some bugs for the time being

posted @ 2023-05-05 18:23  noobwei  阅读(27)  评论(0编辑  收藏  举报