【App Dev-心得筆記】#6 利用iOS Picker 設定樣式與解析並連接JSON,以台灣行政區為例。
Feb 4, 2021
運用 PickerView 做出能夠選擇縣市與對應的區:
成果如下:

1.解析JSON格式:
從RainVisitor在GitHub提供的台灣行政區JSON
https://gist.githubusercontent.com/abc873693/2804e64324eaaf26515281710e1792df/raw/a1e1fc17d04b47c564bbd9dba0d59a6a325ec7c1/taiwan_districts.json


透過分析資料結構後,進行定義JSON對應的Decodable型別,與儲存轉換後的資料存在computed variable。