Swift3 從入門到精通Day26:解析 XML與RSS Reader(2/2)

Alice
Alice
Jul 26, 2017 · 2 min read

日期:7/26(三)

作品:用XML文件做出來的RSS Reader

先匯入rechability檔案拉到專案中確認連線狀況

這是Ojective-C的語法所以要建立一個bridging

然後在RSSReader-Bridging-Header.h import Reachability.h
reachability來確定是否有連線
新開一個RSSParserDelegate檔案

下面的RSSParse要搭配上方的XML文件觀看

然後再修改ViewController程式碼把測試用的內容給刪掉

刪掉測試程式碼然後更改okData的內容

然後按下play就出現拉!!

經過一堆不知名的crash後 看到成品有滿滿的感動

Daily Swift

Alice

Written by

Alice

Swift addict, Taipei|wl02722691@gmail.com

Daily Swift

Hi, I’m Alice. :-]

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade