<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yolanda H. on Medium]]></title>
        <description><![CDATA[Stories by Yolanda H. on Medium]]></description>
        <link>https://medium.com/@yolanda0213h?source=rss-6da9a0dc2159------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-P3mAhUDech2ZFlHeP1n-A.jpeg</url>
            <title>Stories by Yolanda H. on Medium</title>
            <link>https://medium.com/@yolanda0213h?source=rss-6da9a0dc2159------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 00:16:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yolanda0213h/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[從「灰黑的指甲」到「健康美甲」！凍甲、卷甲不再困擾：我在台北優加健甲的養護體驗分享]]></title>
            <link>https://medium.com/@yolanda0213h/%E5%BE%9E-%E7%81%B0%E9%BB%91%E7%9A%84%E6%8C%87%E7%94%B2-%E5%88%B0-%E5%81%A5%E5%BA%B7%E7%BE%8E%E7%94%B2-%E5%87%8D%E7%94%B2-%E5%8D%B7%E7%94%B2%E4%B8%8D%E5%86%8D%E5%9B%B0%E6%93%BE-%E6%88%91%E5%9C%A8%E5%8F%B0%E5%8C%97%E5%84%AA%E5%8A%A0%E5%81%A5%E7%94%B2%E7%9A%84%E9%A4%8A%E8%AD%B7%E9%AB%94%E9%A9%97%E5%88%86%E4%BA%AB-47740fe982f3?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/47740fe982f3</guid>
            <category><![CDATA[灰指甲]]></category>
            <category><![CDATA[肉包甲]]></category>
            <category><![CDATA[健甲]]></category>
            <category><![CDATA[優加健甲]]></category>
            <category><![CDATA[凍甲]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Fri, 05 Dec 2025 11:06:43 GMT</pubDate>
            <atom:updated>2025-12-05T11:06:43.913Z</atom:updated>
            <content:encoded><![CDATA[<p>我的腳指頭小拇指，指甲顏色較深黑黑的，據說這是灰指甲，之前看過多家皮膚科，說要處理的話要很長期堅持，試過很多藥跟方式都沒有解決。偶然在<strong>台北車站</strong>看到一間健甲店有指甲養護的，也有處理凍甲問題，剛好大拇甲也有點凍甲有點痛，就想說試試看這間。(有先上網查過資料，所以對價格有心理準備）</p><p>網路上可以先用line查詢資料跟預約諮詢，所以我現在還可以查到：之前的預約紀錄跟消費紀錄，這點我覺得還蠻方便的。現在還可以查詢到我第一次諮詢是2024年3月8日，回去翻我手機找得到當天處理的照片：</p><figure><img alt="(雙腳的大拇指因為凍甲，所以裝上維持器，這個之前也有看過覺得很神奇，感覺像是另一種美甲裝飾)" src="https://cdn-images-1.medium.com/max/940/1*MtwA_GimXaPD56oAdl6m9Q.png" /></figure><p>(雙腳的大拇指因為凍甲，所以裝上維持器，這個之前也有看過覺得很神奇，感覺像是另一種美甲裝飾)</p><p>在此之前我也曾在另一間皮膚科，根據他們建議用磨指甲跟塗皮膚科用藥的方式，還天天拍照紀錄，但堅持三個月還是有增生跟顏色黑黑的情況：</p><figure><img alt="紅圈處就是指甲黑黑的部分，也許情節也不算非常嚴重，所以我覺得皮膚科醫生也蠻消極的。" src="https://cdn-images-1.medium.com/max/1024/1*X4g8RXpPq97PqIZBF20YWA.png" /></figure><p>紅圈處就是指甲黑黑的部分，也許情節也不算非常嚴重，所以我覺得皮膚科醫生也蠻消極的。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*l-0qxWCoo7x5-rGWGikQUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*sEmKpqEv6FurZgaGXhZpIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cf516kCj95as2DMt1nKoNQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sO3DJJqZpj8bCTGgnzkNTw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KdAs6o82tmmt7RQPdiO6sg.jpeg" /></figure><p>以上是我在皮膚科堅持了一陣子的紀錄，但最後也沒解決，後來才找上其他方法。</p><p>第一次進入優加健甲，環境還蠻明亮舒適的。首次諮詢都是固定由一位媛媛老師，她也是優加健甲的院長。因為不只是看單一個指甲的問題，指頭之間的狀況其實也會互相影響，所以老師會寫一張諮詢單，上面會有雙腳（或雙手），針對你個人的情況列出細項跟綜合的情況。</p><p>類似下圖：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*947R5Ha_uRP6zzvmIx3aMQ.png" /></figure><p>看過之後確認我是兩支大姆指有卷甲，需要將指甲拉平避免凍甲一再發生。小拇指的部分因為黴菌在甲根，只磨掉表面指甲沒辦法解決。這邊健甲師會做清除以及養甲的處理。（難怪之前自己磨跟表面塗藥都沒用，原來黴菌太深了）</p><p>接著就會對全腳的處理建議方案進行報價。我是兩支腳大姆指要戴維持器，都是上萬的！費用是不便宜，但我想把腳的問題都處理好。小拇指的部分也不是單次就能解決，後續需要定期追蹤與處理，所以是每兩週要到店處理。</p><p>報價後健甲師會讓你自己考慮一下，除了費用還有時間都是要堅定地配合，不能三天打魚兩天曬網，不然效果可能會不穩定，甚至讓原本改善的狀況又退回去。</p><p>最後確認自己時間大致可以配合，就決定試試在優加健甲處理腳指甲的狀況了。</p><p>一開始其實有點害怕戴維持器會有點痛，但沒想到媛媛老師的技術手法很快就裝好了。也沒什麼痛感，只是有微微的拉撐感。安裝前後也都有拍照讓我看原本的卷度，還有跟安裝後的卷度比較。（卷度的圖片我沒存下來找不到了）</p><p>小拇指的部分就很有感了！畢竟是要把指甲磨掉。之前看皮膚科醫生叫我回家自己磨，其實我也不會，所以都叫我男朋友幫我磨指甲，但是我又很害怕，會一直問他好了吧！磨一點點就想放棄（但男友似乎覺得是好玩的遊戲）</p><p>有一度皮膚科醫生還說磨太多磨太薄了……（但還是讓黑黑的都消失啊！）</p><p>給健甲老師磨掉指甲的過程我都一直很緊張（就跟去洗牙一樣），會有痛感也會尖叫（但我知道我原本就很怕痛），基礎處理完後就是後續的修護跟保養，持之以恆真的很重要。然後有一款優加健甲自己的手足精華油，按照老師教的方式保養，效果出乎意料的好，這個另篇再說明。</p><p>另外我因為拇指外翻跟鞋子摩擦，其實腳常常會很痛，也會多少影響到指甲。所以老師其實會針對每個人腳的情況給日常保養的建議：包含鞋子跟襪子等等的，感覺非常用心在考慮個人的情況。</p><p>最後我維持器的部分大概戴了一個月就可以拆下來了，而且維持器是每個人專用，買下後如果以後腳有遇到狀況需要再使用，可以用原來的重複安裝，據說這款是特殊研發的工法，所以拉抬指甲效果快又持久不傷甲。（有機會之後再介紹品牌）</p><p>在矯正指甲的過程中，也會有需要做甲根活化，或是甲面強化等等的處理，因為每個人的狀況不同，像是有的指甲長太慢了，可能是營養不夠等。像我也會有些時候指甲比較脆弱容易裂開等問題。所以也會再用一些凝膠保護指甲，這時候才知道健甲的學問真是深啊！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*PDODq75ijV6TslqwuIXhxA.png" /></figure><p>大概兩三個月可以看到，比以前黑黑的好很多了。（但以健甲師看來還沒長完，還是要好好繼續養甲追蹤觀察）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*eCBSIm7HSkE2H3mR4kRTxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*aB2y__0CgAF3_WN2cJiOSw.png" /></figure><p>這中間也會有建議的飲食禁忌，例如不要吃蝦跟泡菜，多吃鈣，都會影響指甲的生長等等。（然後還會有親友的風涼話，一直在旁邊說不要管那些 ）但既然希望好好的長，該做的事就都儘量乖乖的做，也減少失敗的變數。</p><p>一點一點看著指甲的狀況越來越好，而且是雙腳的指甲都變漂亮了，感覺真的很不錯。</p><p>另外，在做指甲養護的過程中，也學到了腳指甲正確的修剪方式，還有甲垢的清潔原來要那麼仔細！一開始指甲縫被清得那麼精細真的很不習慣，但後來發現原來那種「不習慣」只是因為以前從沒真正清潔過。</p><p>隨著每次養護後指甲縫變得乾淨、沒有異味，連指尖的壓力感都減輕了，走路也更舒服。更重要的是，甲垢清除後，指甲也越來越美。現在反而會期待每次回店的養護時間，像是給雙腳做一次深層保養。</p><p>附上我最後養護完成的指甲照，不再黑黑的了。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*5fSExOtulmfsl2M3y7Tzbg.png" /></figure><p>優加健甲除了在台北車站很方便外，在三重台北橋站也有店面。無論是手足要做基礎的清潔保養，還是需要針對卷甲、凍甲或灰指甲後續的養護處理，都能在這裡獲得專業的服務。在店裡也會聽到有很多人是長肉刺、肉包甲來處理的。</p><p>附上幾張優加健甲台北店的環境照↓</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*InEXomQRy2eUsDJuvhj3og.jpeg" /></figure><figure><img alt="(第一次是下班後過來，要看腳趾甲，還有提供拖鞋更換)" src="https://cdn-images-1.medium.com/max/1024/1*bETzVEajq7fvC65SkVYTVw.jpeg" /></figure><p>(第一次是下班後過來，要看腳趾甲，還有提供拖鞋更換)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6TvVMvn2Wx6d1r2vl-XVEQ.jpeg" /></figure><p>(候位區有舒適的沙發，親友陪同來處理指甲問題也有座位)</p><figure><img alt="腳指甲處理專用座位，這邊也可以進行足部保養喔" src="https://cdn-images-1.medium.com/max/1024/1*yNYvl_3hkrz-ot2dDaWBJA.jpeg" /><figcaption>腳指甲處理專用座位，這邊也可以進行足部保養喔</figcaption></figure><p>(腳指甲處理專用座位，這邊也可以進行足部保養喔!)</p><p>如果有一樣凍甲、灰指甲、卷甲需求的人，</p><p>可以到店家優加健甲FB，詢問預約諮詢的時間唷！</p><p>(位置在台北車站附近，定期回去養護指甲健康，很方便)</p><p><a href="https://www.facebook.com/profile.php?id=61555264718851">優加健甲美甲台北站前旗艦店 | Taipei</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bf2bL2LVlIeYUGxlaHUbg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47740fe982f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS App release]App審查拒絕-Guideline 4.3]]></title>
            <link>https://medium.com/@yolanda0213h/ios-release-app%E5%AF%A9%E6%9F%A5%E6%8B%92%E7%B5%95-guideline-4-3-bd55500ca021?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd55500ca021</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[app-store]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Sun, 22 May 2022 16:36:06 GMT</pubDate>
            <atom:updated>2022-05-23T04:06:02.108Z</atom:updated>
            <content:encoded><![CDATA[<p>續前篇：瑪雅印記APP成功上架</p><p><a href="https://medium.com/@yolanda0213h/ios-app-release-%E7%91%AA%E9%9B%85%E5%8D%B0%E8%A8%98app%E6%88%90%E5%8A%9F%E4%B8%8A%E6%9E%B6-6889f5c7c1d4">[iOS APP release]瑪雅印記APP成功上架</a></p><p>此款App從第一次提交到再三被拒重送直到成功上架，其實共經歷了38天！</p><p>首次提交審查是2022/3/23，很快在隔天凌晨4點就得到回覆訊息<br>（應該是審查人員工作時間）</p><p>結果審查拒絕並附上2項原因及建議與截圖：</p><pre><strong><br>Guideline 1.3 - Safety - Kids Category</strong></pre><pre>You have selected the Kids category for your app, but your app does not appear to be designed specifically for kids aged 11 and under. </pre><pre> Specifically, we noticed that your app is a fortune telling app.</pre><pre><strong><em>Next Steps</em></strong></pre><pre> To resolve this issue, please resubmit your app without the Kids category designation.</pre><pre><strong>Guideline 4.3 - Design - Spam</strong></pre><pre>Your app primarily features astrology, horoscopes, palm reading, fortune telling or zodiac reports. As such, it duplicates the content and functionality of many other similar apps currently available on the App Store.</pre><pre>While these app features may be useful, informative or entertaining, we simply have enough of these types of apps on the App Store, and they are considered a form of spam. </pre><pre><strong><em>Next Steps</em></strong></pre><pre>We encourage you to review your app concept and incorporate different content and features that are in compliance with the <a href="https://developer.apple.com/app-store/review/guidelines/">App Store Review Guidelines</a>.</pre><pre>Please see attached screenshot for details.</pre><p>1.3的問題好解決，此app確實是命理相關，也不必要提供兒童使用，所以只要提交審查時，修改成不要指定兒童類別就可以了。</p><p>但4.3卻是一個麻煩的問題！被歸類為4.3表示被蘋果視為重複的多餘的存在。4.3的原始內容為：</p><pre><strong>4.3 Spam</strong><br>Don’t create multiple Bundle IDs of the same app. If your app has different versions for specific locations, sports teams, universities, etc., consider submitting a single app and provide the variations using in-app purchase. Also avoid piling on to a category that is already saturated; the App Store has enough fart, burp, flashlight, fortune telling, dating, drinking games, and Kama Sutra apps, etc. already. We will reject these apps unless they provide a unique, high-quality experience. Spamming the store may lead to your removal from the Apple Developer Program.</pre><p>網路上查詢了許多4.3的解決應對方法，看起來處理是很棘手，而許多是真的有重複內容的app這種問題，所以有許多他人纏鬥經驗的分享：</p><ul><li><a href="https://blog.csdn.net/Drunkard_001/article/details/120408032">关于Apple Review的Guideline 4.3 - Design的分析与建议_Drunkard_001的博客-CSDN博客</a></li><li><a href="https://segmentfault.com/a/1190000039826755">iOS App送审，审核4.3被拒问题怎样处理我来告诉你</a></li></ul><p>而我的app確實算是4.3中提到的fortune telling，但是我當初會做這款app，就是因為在App Store上找不到這樣的內容（而網路分享者有寫比起回覆解說自己app的獨特，直接對app做些小修改重送會比較容易通過。）</p><p>而依據審查人附上的截圖，我認為我被拒原因可能是“部分畫面真的過於陽春”，未符合high-quality，所以決定修改截圖部分視覺畫面，作為我主要的app修改項目。（原本只有根據結果，程式設定不同文字顏色與底色，後來有全部加圓弧外框跟重新定色）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFjc_Xd9pccnyZMMwaJ-uA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AS9CyHkDgi-zGhGMLbbJ6g.png" /><figcaption>左為第一版被拒截圖，右為修改後畫面</figcaption></figure><p>第1次重送後，1.3的狀況解決了，4.3的問題仍不被認為已解決，並又附上問題截圖（同上13波符軌跡畫面）。</p><p>如此，表示蘋果不認為修改畫面設計有解決此問題，所以我便朝著incorporate different content and features的方向進行app修改，於是我新增了未來改版才想放上去的”合盤功能“，不過我做的是『當日運勢合盤』！<br>這算是運用瑪雅曆特殊的合盤方式，試行的一種較新穎的想法（我個人還沒有看過其他人有這樣解）。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9JMG_nGFqWWryJmiTdIW0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*gT0LeM2792rrvufdKp4FXQ.jpeg" /></figure><p>第2次重送結果：依然因為4.3被拒，附上的截圖其1為原本的解說畫面，另1為新的合盤畫面。我對這樣的結果，其實很困惑，因為我新增的是一個全新的功能，在新增之前也再次查詢過App Store上的相關App，不應該是有重複內容的問題。（而且App Store上明明相同功能的App也超級多，還是有很多新的！）</p><p>研究了其他人的做法，決定第3次重送，試著解說我的app獨特性，參考文：</p><p>1.</p><p><a href="https://www.jianshu.com/p/2a20b7ed5e10">iOS开发Guideline 4.3 - Design被拒的解决路程</a></p><p>2.</p><p><a href="https://read01.com/zh-tw/0ezaG8D.html#.Yoo_3PNBxQJ">https://read01.com/zh-tw/0ezaG8D.html#.Yoo_3PNBxQJ</a></p><p>可惜還是被拒，就試著用申訴方式，然而，申訴依然不被接受：</p><pre>Hello,<br><br>Thank you for your patience as we considered your appeal.<br><br>The App Review Board determined that the original rejection feedback was valid. Your app does not comply with:<br><br>4.3 - Design<br><br>We continue to find your app primarily features astrology, horoscopes, palm reading, fortune telling or zodiac reports. As such, it duplicates the content and functionality of many other similar apps currently available on the App Store.<br><br>It would be appropriate to review your app concept and incorporate different content and features that are in compliance with the <a href="https://developer.apple.com/app-store/review/guidelines/">App Store Review Guidelines</a>.<br><br>We appreciate your efforts to resolve this issue and look forward to reviewing your revised submission. <br><br>Best regards,<br>Leo<br>App Review Board</pre><p>這樣似乎表示，新功能因為依然是算命命理功能，所以不被接受？！於是我決定要撤除當日運勢合盤，並開始思考要增加怎樣的非命理新功能？</p><p>後來，我想到之前作業練習的拍立得app，是獲得較多人興趣的項目，所以我結合這款設計，構思了『瑪雅祝福小卡』！規劃在每日瑪雅跟指定瑪雅盤都可以製作專屬卡片內容，這是既結合了瑪雅曆內容，又不屬於命理功能，而是屬於圖像、生活風格的新功能。第4次版本就送出了這項新功能。</p><p><strong>這次重送後被拒，截圖跟上次有不同情況，這次截圖沒有提到新功能的畫面，只是再次附上第一個tab的今日瑪雅解說。</strong></p><p><strong>所以我最後考慮第一個畫面不要直接呈現瑪雅解說，而是修改頁面位置，將當日瑪雅小卡的內容移到最開頭（因為當日小卡也會直接計算呈現當日瑪雅KIN)，如此一來，在三個tab的第一個畫面都不會直接呈現命理結果解說，我試著把app定位避免成為算命app；並且原本app提交是設定全部的地區，在此次提交時，參考其他人說法，重新設定地區，考量華人比較多的地區，由原先的175個地區變為29個地區。</strong></p><p><strong>這次重送後，驚喜的終於通過審核了！！（而且原本需取消兒童類別設為17+，也自動變回兒童可用的4+ ）</strong></p><p>所以，這就是瑪雅祝福小卡的由來 🥲</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SiTFng81AzEL9eYm7Rg7wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wXUvSBlMIZnQVzQIKTnATQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pi6TMBLfljYmlrjLShhEmw.png" /></figure><p>紀念一下第一次跟App審查來往的經過：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T1bif20F54ogwl03eYfz7A.png" /></figure><p>再附上&quot;iOS应用审核被拒的原因及提交应用的注意事项&quot;</p><p><a href="https://xnxy.github.io/2017/10/13/iOS%E5%BA%94%E7%94%A8%E5%AE%A1%E6%A0%B8%E8%A2%AB%E6%8B%92%E7%9A%84%E5%8E%9F%E5%9B%A0%E5%8F%8A%E6%8F%90%E4%BA%A4%E5%BA%94%E7%94%A8%E7%9A%84%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/">iOS应用审核被拒的原因及提交应用的注意事项。</a></p><p>瑪雅印記app已經更新過2次囉～（雖然好像還是有問題待排除😭）<br>有看到此篇，還沒下載過的，捧個場下載一下吧 😉 ipad 也可以下載<br>（如果有遇到問題歡迎告知我，我會盡力處理的！）</p><p><a href="https://apps.apple.com/tw/app/%E7%91%AA%E9%9B%85%E5%8D%B0%E8%A8%98/id1615707083">‎瑪雅印記</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd55500ca021" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS APP release]瑪雅印記APP成功上架]]></title>
            <link>https://medium.com/@yolanda0213h/ios-app-release-%E7%91%AA%E9%9B%85%E5%8D%B0%E8%A8%98app%E6%88%90%E5%8A%9F%E4%B8%8A%E6%9E%B6-6889f5c7c1d4?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/6889f5c7c1d4</guid>
            <category><![CDATA[maya]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Sun, 01 May 2022 08:17:06 GMT</pubDate>
            <atom:updated>2022-05-29T14:26:19.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Fy1aTAO8d096VwwjE5NkZg.png" /></figure><p>終於！！成功上架第一個我自己寫程式的APP了:-D</p><p>回想審核過程的被拒修改、再被拒再修改、再三被拒再三修改，</p><p>感覺比寫程式本身還煎熬，就怕無法順利上架啊～</p><p>所幸終於突破困境了！</p><p>完成APP並上架這件事其實被擱置了很久，起這個頭的時候才剛認識瑪雅曆，是蠻有趣的命理工具，那時只有一些網頁資料，我唯一找到一款免費的APP還是荷蘭文的！所以才想說來做瑪雅曆這個主題。結果拖拖拉拉到現在，也有出現幾款中文版瑪雅曆APP了！不過波符13問這塊，我目前沒看到其他APP有，我做的這款也算是能提供不錯用的工具吧～（祝福小卡這塊又是另一段辛酸故事了，<a href="https://medium.com/@yolanda0213h/ios-release-app%E5%AF%A9%E6%9F%A5%E6%8B%92%E7%B5%95-guideline-4-3-bd55500ca021">另篇</a>說明囉！）</p><p>我寫的APP：瑪雅印記</p><p><a href="https://apps.apple.com/tw/app/%E7%91%AA%E9%9B%85%E5%8D%B0%E8%A8%98/id1615707083">‎瑪雅印記</a></p><p>下一篇（祝福小卡源由）：</p><p><a href="https://medium.com/@yolanda0213h/ios-release-app%E5%AF%A9%E6%9F%A5%E6%8B%92%E7%B5%95-guideline-4-3-bd55500ca021">[iOS App release]App審查拒絕-Guideline 4.3</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6889f5c7c1d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study]模仿飲料APP，上傳資料到後台，以可不可熟成紅茶為例]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-%E6%A8%A1%E4%BB%BF%E9%A3%B2%E6%96%99app-%E4%B8%8A%E5%82%B3%E8%B3%87%E6%96%99%E5%88%B0%E5%BE%8C%E5%8F%B0-%E4%BB%A5%E5%8F%AF%E4%B8%8D%E5%8F%AF%E7%86%9F%E6%88%90%E7%B4%85%E8%8C%B6%E7%82%BA%E4%BE%8B-5f2d0e6d845e?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f2d0e6d845e</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[sheetdb]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[tableviews]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Sat, 05 Oct 2019 10:57:12 GMT</pubDate>
            <atom:updated>2019-10-05T12:06:45.675Z</atom:updated>
            <content:encoded><![CDATA[<p>學習串接後台 API，新增讀取後台資料</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vq3lyOjP89UCfi4GZTDAwQ.png" /></figure><p><strong>建立飲料菜單資料庫，並運用搭配雲端平台 SheetDB</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*qsjOmutTvoQB93VBUp5e-Q.png" /></figure><p><a href="https://sheetdb.io/?source=post_page-----6a9ac14a2a22----------------------">API from your Google Spreadsheets, read JSON, modify with RESTful API.</a></p><p><strong>下載飲料資料</strong></p><pre><strong>struct</strong> Drink: Codable {</pre><pre><strong>var</strong> brand: String</pre><pre><strong>var</strong> drink: String</pre><pre><strong>var</strong> size: String?</pre><pre><strong>var</strong> price: String?</pre><pre><strong>var</strong> drinkID: String?</pre><pre><strong>var</strong> detail: String?</pre><pre>}</pre><pre><strong>struct</strong> Order: Codable {</pre><pre><strong>var</strong> orderDrink: String</pre><pre><strong>var</strong> orderPrice: Int</pre><pre>}</pre><pre>--</pre><pre><strong>var</strong> orders:[Order] = []</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre><strong>if</strong> <strong>let</strong> url = URL(string: &quot;https://sheetdb.io/api/v1/7vd0ylfezf9zg&quot;){</pre><pre><strong>let</strong> task = URLSession.shared.dataTask(with: url) { (data, response, error) <strong>in</strong></pre><pre><strong>let</strong> decoder = JSONDecoder()</pre><pre><strong>if</strong> <strong>let</strong> data = data {</pre><pre><strong>do</strong> {</pre><pre><strong>let</strong> drinkData = <strong>try</strong> decoder.decode([Drink].<strong>self</strong>, from: data)</pre><pre>print(drinkData.count)</pre><pre><strong>for</strong> i <strong>in</strong> 0...drinkData.count - 1 {</pre><pre><strong>let</strong> brand = drinkData[i].brand</pre><pre><strong>let</strong> drink = drinkData[i].drink</pre><pre><strong>let</strong> size = drinkData[i].size</pre><pre><strong>let</strong> priceInt:Int = Int(drinkData[i].price!)!</pre><pre><strong>if</strong> brand == &quot;可不可熟成紅茶&quot; {</pre><pre><strong>let</strong> drinkName = &quot;\(drink)\(size!)&quot;+&quot;杯&quot;</pre><pre><strong>let</strong> oneOrder = Order(orderDrink: &quot;\(drinkName)$\(priceInt)&quot;, orderPrice: priceInt)</pre><pre><strong>self</strong>.orders.append(oneOrder)</pre><pre>}}}</pre><pre><strong>catch</strong>{</pre><pre>print(error)</pre><pre>}</pre><pre>}}</pre><pre>task.resume()</pre><pre>}}</pre><p><strong>建立選單資訊</strong></p><pre><strong>@IBAction</strong> <strong>func</strong> drinkButton(<strong>_</strong> sender: UIButton) {</pre><pre><strong>let</strong> controller = UIAlertController(title: <strong>nil</strong>, message: <strong>nil</strong>, preferredStyle: .actionSheet)</pre><pre><strong>for</strong> drink <strong>in</strong> orders {</pre><pre><strong>let</strong> action = UIAlertAction(title: drink.orderDrink, style: .default) { (<strong>_</strong>) <strong>in</strong></pre><pre>sender.setTitleColor(UIColor.black, for: .normal)</pre><pre>sender.setTitle(drink.orderDrink, for: .normal)</pre><pre>}</pre><pre>controller.addAction(action)</pre><pre>}</pre><pre><strong>let</strong> cancelAction = UIAlertAction(title: &quot;取消&quot;, style: .cancel, handler: <strong>nil</strong>)</pre><pre>controller.addAction(cancelAction)</pre><pre>present(controller, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*ZIzUARTAARHrRcyQxyvCHA.gif" /></figure><p><strong>飲料介紹展示（segue到另一tableViewController）</strong></p><pre><strong>struct</strong> Menu: Codable {</pre><pre><strong>var</strong> drinkName: String</pre><pre><strong>var</strong> detail: String</pre><pre><strong>var</strong> drinkID: String</pre><pre>}</pre><pre>--</pre><pre><strong><br>class</strong> DrinkTypeTableViewController: UITableViewController {</pre><pre><strong>var</strong> menu:[Menu] = []</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre><strong>if</strong> <strong>let</strong> url = URL(string: &quot;https://sheetdb.io/api/v1/7vd0ylfezf9zg&quot;){</pre><pre><strong>let</strong> task = URLSession.shared.dataTask(with: url) { (data, response, error) <strong>in</strong></pre><pre><strong>let</strong> decoder = JSONDecoder()</pre><pre><strong>if</strong> <strong>let</strong> data = data {</pre><pre><strong>do</strong> {</pre><pre><strong>let</strong> drinkData = <strong>try</strong> decoder.decode([Drink].<strong>self</strong>, from: data)</pre><pre><strong>for</strong> i <strong>in</strong> 0...drinkData.count - 1 {</pre><pre><strong>let</strong> brand = drinkData[i].brand</pre><pre><strong>let</strong> drinkID = drinkData[i].drinkID</pre><pre><strong>let</strong> drink = drinkData[i].drink</pre><pre><strong>let</strong> detail = drinkData[i].detail</pre><pre><strong>let</strong> priceInt:Int = Int(drinkData[i].price!)!</pre><pre><strong>if</strong> brand == &quot;可不可熟成紅茶&quot; {</pre><pre><strong>let</strong> drinkMenu = Menu(drinkName: drink, detail: detail!, drinkID: drinkID!)</pre><pre><strong>self</strong>.menu.append(drinkMenu)</pre><pre>DispatchQueue.main.async {</pre><pre><strong>self</strong>.tableView.reloadData()</pre><pre>}}}}</pre><pre><strong>catch</strong>{</pre><pre>print(error)</pre><pre>}}}</pre><pre>task.resume()</pre><pre>}}</pre><pre><strong>override</strong> <strong>func</strong> numberOfSections(in tableView: UITableView) -&gt; Int {</pre><pre><strong>return</strong> 1</pre><pre>}</pre><pre><strong>override</strong> <strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {</pre><pre><strong>return</strong> menu.count</pre><pre>}</pre><pre><strong>override</strong> <strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {</pre><pre><strong>let</strong> drinkMenu = menu[indexPath.row]</pre><pre><strong>let</strong> cell = tableView.dequeueReusableCell(withIdentifier: &quot;TypeTableViewCell&quot;, for: indexPath) <strong>as</strong>! TypeTableViewCell</pre><pre>cell.drinkImage.image = UIImage(named: drinkMenu.drinkID)</pre><pre>cell.drinkLabel.text = &quot;\(drinkMenu.drinkName)\n----------\n\(drinkMenu.detail)&quot;</pre><pre><strong>return</strong> cell</pre><pre>}</pre><p>注意：因網路下載需要時間，需加上<strong>self</strong>.tableView.reloadData() 才能讓飲料介紹資料成功展示</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*q2j83piwGy31yZMYCcvgVA.png" /></figure><p><strong>展示甜度冰塊資訊（顯示 popover 彈出視窗）</strong></p><p>教學：</p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%9C%A8-iphone-ipad-%E4%B8%8A%E9%A1%AF%E7%A4%BA-popover-%E5%BD%88%E5%87%BA%E8%A6%96%E7%AA%97-ac196732e557">在 iPhone &amp; iPad 上顯示 popover 彈出視窗</a></p><pre><strong>override</strong> <strong>func</strong> prepare(for segue: UIStoryboardSegue, sender: <strong>Any</strong>?) {</pre><pre>segue.destination.preferredContentSize = CGSize(width: 400, height: 240)</pre><pre>segue.destination.popoverPresentationController?.delegate = <strong>self</strong></pre><pre><strong>if</strong> segue.identifier != &quot;0&quot; {</pre><pre><strong>let</strong> imageName = String(segue.identifier!)</pre><pre><strong>if</strong> <strong>let</strong> controller = segue.destination <strong>as</strong>? SecondViewController {</pre><pre>controller.imageName = imageName</pre><pre>}}}</pre><pre><strong>func</strong> adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -&gt; UIModalPresentationStyle {</pre><pre><strong>return</strong> .none</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*mdFNrHYGk_N6ITOYN2HwGg.gif" /></figure><p>由於我將兩個segue.destination的命名同圖片的名稱，故直接設定</p><pre><strong>let</strong> imageName = String(segue.identifier!)</pre><p>segue.identifier 為0是 飲料介紹頁的segue</p><p><strong>檢查所有資料是否填入完整</strong></p><pre><strong>@IBAction</strong> <strong>func</strong> sentButton(<strong>_</strong> sender: UIButton) {</pre><pre><strong>let</strong> mediumID = mediumTextField.text</pre><pre><strong>let</strong> medium = &quot;https://medium.com/\(mediumID ?? &quot;@&quot;)&quot;</pre><pre><strong>if</strong> nameTextField.text?.isEmpty == <strong>true</strong> {</pre><pre><strong>let</strong> controller = UIAlertController(title: &quot;請填入名字稱呼&quot;, message: <strong>nil</strong>, preferredStyle: .alert)</pre><pre>controller.addAction(UIAlertAction(title: &quot;ok&quot;, style: .default, handler: <strong>nil</strong>))</pre><pre>present(controller, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre><strong>return</strong></pre><pre>}<strong>else</strong> <strong>if</strong> mediumTextField.text?.isEmpty == <strong>false</strong> ,URL(string: medium) != <strong>nil</strong> {</pre><pre><strong>if</strong> orderIceButton.titleColor(for: .normal) == UIColor.black, orderSugarButton.titleColor(for: .normal) == UIColor.black, orderIceButton.titleColor(for: .normal) == UIColor.black{</pre><pre>keepData()</pre><pre>tabBarController?.selectedIndex = 1</pre><pre>}<strong>else</strong> {</pre><pre><strong>let</strong> controller = UIAlertController(title: &quot;請選擇飲料及甜度冰塊&quot;, message: <strong>nil</strong>, preferredStyle: .alert)</pre><pre>controller.addAction(UIAlertAction(title: &quot;ok&quot;, style: .default, handler: <strong>nil</strong>))</pre><pre>present(controller, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre><strong>return</strong></pre><pre>}</pre><pre>}<strong>else</strong> {</pre><pre><strong>let</strong> controller = UIAlertController(title: &quot;請填入mediumID&quot;, message: <strong>nil</strong>, preferredStyle: .alert)</pre><pre>controller.addAction(UIAlertAction(title: &quot;ok&quot;, style: .default, handler: <strong>nil</strong>))</pre><pre>present(controller, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre><strong>return</strong></pre><pre>}</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*6N0bVUARvO3IsLh-2eTFVQ.gif" /></figure><p>若資料完整則送出上傳資料，並跳轉至統計頁面</p><pre>keepData()</pre><pre>tabBarController?.selectedIndex = 1</pre><p><strong>儲存語法</strong></p><pre><strong>func</strong> keepData(){</pre><pre><strong>let</strong> time = Date()</pre><pre><strong>let</strong> formatter = DateFormatter()</pre><pre>formatter.dateFormat = &quot;yyyy-MM-dd HH:mm:ss&quot;</pre><pre><strong>let</strong> dateData = formatter.string(from: time)</pre><pre>print(dateData)</pre><pre>//now date</pre><pre><strong>let</strong> nameData = nameTextField.text!</pre><pre><strong>let</strong> mediumData = mediumTextField.text!</pre><pre>//orderDrink &amp; price</pre><pre><strong>let</strong> order = orderDrinkButton.title(for: .normal)!.components(separatedBy: &quot;$&quot;)</pre><pre><strong>let</strong> priceData:Int = Int(order[1])!</pre><pre><strong>let</strong> orderData = &quot;\(order[0]).\(orderSugarButton.title(for: .normal)!).\(orderIceButton.title(for: .normal)!)&quot;</pre><pre>//將新增資料上傳網路</pre><pre><strong>let</strong> newData = UploadData(date: dateData, name: nameData, mediumID: mediumData, drink: orderData, price: priceData)</pre><pre>post(orderData: newData)</pre><pre>}</pre><p><strong>將新增資料上傳sheetDB</strong></p><p>先建立sheetDB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*DgWTNP2uHqo__cVGT77BLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*iLp2zFyMSSgFJM_hvmw9Aw.png" /></figure><pre><strong>struct</strong> UploadData: Codable {</pre><pre><strong>var</strong> date:String</pre><pre><strong>var</strong> name:String</pre><pre><strong>var</strong> mediumID:String</pre><pre><strong>var</strong> drink:String</pre><pre><strong>var</strong> price:Int</pre><pre>}</pre><pre><strong>struct</strong> Data:Encodable {</pre><pre><strong>var</strong> data:UploadData</pre><pre>}</pre><pre><strong>func</strong> post(orderData:UploadData){</pre><pre><strong>let</strong> url = URL(string: &quot;https://sheetdb.io/api/v1/2bnkitnsc8xzd&quot;)</pre><pre><strong>var</strong> urlRequest = URLRequest(url: url!)</pre><pre>urlRequest.httpMethod = &quot;POST&quot;</pre><pre>urlRequest.setValue(&quot;application/json&quot;, forHTTPHeaderField: &quot;Content-Type&quot;)</pre><pre><strong>let</strong> order = Data(data: orderData)</pre><pre><strong>let</strong> jsonEncoder = JSONEncoder()</pre><pre><strong>if</strong> <strong>let</strong> encoderData = <strong>try</strong>? jsonEncoder.encode(order){</pre><pre><strong>let</strong> task = URLSession.shared.uploadTask(with: urlRequest, from: encoderData) { (retData, res, err) <strong>in</strong></pre><pre><strong>let</strong> decoder = JSONDecoder()</pre><pre><strong>if</strong> <strong>let</strong> retData = retData, <strong>let</strong> dic = <strong>try</strong>? decoder.decode([String:Int].<strong>self</strong>, from: retData), dic[&quot;created&quot;] == 1 {</pre><pre>print(&quot;ok&quot;)</pre><pre>}<strong>else</strong>{</pre><pre>print(&quot;error&quot;)</pre><pre>}</pre><pre>}</pre><pre>task.resume()</pre><pre>}</pre><pre>}</pre><p>上傳資料成功可在網路後台看到資料</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*p6j2kMYKRRFk3G5QQDMoOQ.png" /></figure><p>在統計頁面用tableView下載顯示</p><pre><strong>struct</strong> List: Codable {</pre><pre><strong>var</strong> date:String</pre><pre><strong>var</strong> name:String</pre><pre><strong>var</strong> mediumID:String</pre><pre><strong>var</strong> drink:String</pre><pre><strong>var</strong> sugar:String</pre><pre><strong>var</strong> ice:String</pre><pre><strong>var</strong> price:Int</pre><pre>}</pre><pre><strong>struct</strong> DownLoad: Codable {</pre><pre><strong>var</strong> date:String</pre><pre><strong>var</strong> name:String</pre><pre><strong>var</strong> mediumID:String</pre><pre><strong>var</strong> drink:String</pre><pre><strong>var</strong> price:String</pre><pre>}</pre><pre><strong>func</strong> fecth (urlStr:String, complation:<strong>@escaping</strong> ([DownLoad]?) -&gt; Void) {</pre><pre><strong>if</strong> <strong>let</strong> url = URL(string: urlStr){</pre><pre><strong>let</strong> task = URLSession.shared.dataTask(with: url) { (data, response, error) <strong>in</strong></pre><pre><strong>let</strong> decoder = JSONDecoder()</pre><pre><strong>if</strong> <strong>let</strong> data = data, <strong>let</strong> drinkData = <strong>try</strong>? decoder.decode([DownLoad].<strong>self</strong>, from: data){</pre><pre>complation(drinkData)</pre><pre>}<strong>else</strong> {</pre><pre>complation(<strong>nil</strong>)</pre><pre>}}</pre><pre>task.resume()</pre><pre>}<strong>else</strong>{</pre><pre>complation(<strong>nil</strong>)</pre><pre>}}</pre><pre><strong>struct</strong> NewList:Codable {</pre><pre><strong>var</strong> drinkName:String</pre><pre><strong>var</strong> cupCount:Int</pre><pre>}</pre><p>tableViewController (不寫在viewDidLoad，而寫在viewDidAppear)</p><pre><strong>override</strong> <strong>func</strong> viewDidAppear(<strong>_</strong> animated: Bool) {</pre><pre>download(url: &quot;https://sheetdb.io/api/v1/2bnkitnsc8xzd&quot;)</pre><pre><strong>self</strong>.tableView.reloadData()</pre><pre>}</pre><p>下載訂購資料</p><pre><strong>var</strong> orders:[List] = []</pre><pre><strong>var</strong> newList:[NewList] = []</pre><pre><strong>func</strong> download(url:String){</pre><pre>orders = []</pre><pre>newList = []</pre><pre><strong>let</strong> urlStr = url</pre><pre>fecth(urlStr: urlStr) { (drinkData) <strong>in</strong></pre><pre><strong>if</strong> <strong>let</strong> drinkData = drinkData, drinkData.count &gt;= 1 {</pre><pre><strong>for</strong> i <strong>in</strong> 0...drinkData.count - 1 {</pre><pre><strong>let</strong> date = drinkData[i].date</pre><pre><strong>let</strong> name = drinkData[i].name</pre><pre><strong>let</strong> medium = drinkData[i].mediumID</pre><pre><strong>let</strong> drinks = drinkData[i].drink.components(separatedBy: &quot;.&quot;)</pre><pre><strong>let</strong> price = drinkData[i].price</pre><pre><strong>let</strong> oneOrder = List(date: date, name: name, mediumID: medium, drink: drinks[0],sugar:drinks[1],ice: drinks[2], price:Int(price)!)</pre><pre><strong>let</strong> list = NewList(drinkName: drinkData[i].drink, cupCount: 1)</pre><pre><strong>self</strong>.orders.append(oneOrder)</pre><pre><strong>self</strong>.newList.append(list)</pre><pre>DispatchQueue.main.async {</pre><pre><strong>self</strong>.tableView.reloadData()</pre><pre>}}</pre><pre><strong>self</strong>.orders.reverse()</pre><pre>}}}</pre><p>reverse是讓array反序，我讓最新資料展示在最上方</p><p><strong>新增表格刷新功能</strong></p><pre><strong>@objc</strong> <strong>func</strong> handleRefresh(refreshControl:UIRefreshControl){</pre><pre>download(url: &quot;https://sheetdb.io/api/v1/2bnkitnsc8xzd&quot;)</pre><pre><strong>self</strong>.tableView.reloadData()</pre><pre>refreshControl.endRefreshing()</pre><pre>}</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre><strong>self</strong>.refreshControl?.addTarget(<strong>self</strong>, action: <strong>#selector</strong>(<strong>self</strong>.handleRefresh(refreshControl:)), for: UIControl.Event.valueChanged)</pre><pre>}</pre><p>這個是我另外問彼得潘問到的教學說明：</p><p><a href="https://www.andrewcbancroft.com/2015/03/17/basics-of-pull-to-refresh-for-swift-developers/">Basics of Pull to Refresh for Swift Developers</a></p><p>更新效果</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*krwGC1qWiRxTOZdn9HBhAQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*Nm66Z_0abxc2nSDJ1FcDZw.gif" /></figure><p>另外新增的mediumID用連結出網頁展示（目前只是堪用 不太流暢）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*2x2tLCo-P0mFl6fHbq3HSQ.gif" /></figure><p><strong>訂購飲料重新分類統計</strong></p><p>除了按訂購人訂購時間展示訂購清單外，我認爲應該依照訂購飲料類別重新分類統計及排序：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*TCVZJ_yunbr-W4PIU0TQKg.gif" /></figure><pre><strong>var</strong> list2:[NewList] = []</pre><pre>list2.append(newList[0])</pre><pre><strong>for</strong> i <strong>in</strong> 1...newList.count-1 {</pre><pre><strong>var</strong> a = 0</pre><pre><strong>for</strong> j <strong>in</strong> 0...list2.count-1 {</pre><pre><strong>if</strong> newList[i].drinkName != list2[j].drinkName {</pre><pre>a += 1</pre><pre><strong>if</strong> a == list2.count {</pre><pre>list2.append(newList[i])</pre><pre>}</pre><pre>}<strong>else</strong>{</pre><pre>list2[j].cupCount += 1</pre><pre>a = 100</pre><pre>}}}</pre><pre><strong>var</strong> b = 0</pre><pre><strong>for</strong> z <strong>in</strong> 0...list2.count-1 {</pre><pre>b += list2[z].cupCount</pre><pre>}</pre><pre>list2.sort { (a, b) -&gt; Bool <strong>in</strong></pre><pre>a.drinkName &gt; b.drinkName</pre><pre>}</pre><pre>controller?.list2 = list2</pre><pre>controller?.cupCount = b</pre><p>github:</p><p><a href="https://github.com/yolanda0213h/orderDrink">yolanda0213h/orderDrink</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f2d0e6d845e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-%E6%A8%A1%E4%BB%BF%E9%A3%B2%E6%96%99app-%E4%B8%8A%E5%82%B3%E8%B3%87%E6%96%99%E5%88%B0%E5%BE%8C%E5%8F%B0-%E4%BB%A5%E5%8F%AF%E4%B8%8D%E5%8F%AF%E7%86%9F%E6%88%90%E7%B4%85%E8%8C%B6%E7%82%BA%E4%BE%8B-5f2d0e6d845e">[iOS study]模仿飲料APP，上傳資料到後台，以可不可熟成紅茶為例</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study] 練習串接第三方 API，以Google Custom Search展示mojim歌詞]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-%E7%B7%B4%E7%BF%92%E4%B8%B2%E6%8E%A5%E7%AC%AC%E4%B8%89%E6%96%B9-api-%E4%BB%A5google-custom-search%E5%B1%95%E7%A4%BAmojim%E6%AD%8C%E8%A9%9E-12e111ebf1b5?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/12e111ebf1b5</guid>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 09:49:39 GMT</pubDate>
            <atom:updated>2019-08-26T10:14:21.448Z</atom:updated>
            <content:encoded><![CDATA[<p>練習串接Google Custom Search JSON API，以mojim歌詞網為例</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TpX6_OX6ZxvjdZTEQYVtrQ.png" /></figure><p>如何取得 search engine ID &amp; API key教學：</p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84%E8%A9%A6%E7%85%89-%E5%8B%87%E8%80%85%E7%9A%84-100-%E9%81%93-swift-ios-app-%E8%AC%8E%E9%A1%8C/81-%E8%A3%BD%E4%BD%9C-google-%E6%90%9C%E5%B0%8B-app-%E6%90%AD%E9%85%8D-google-custom-search-json-api-36e5298086e4">#81 製作 Google 搜尋 App — 搭配 Google Custom Search JSON API</a></p><p>由於這次table使用到多個section，根據不同section串接不同API目標，因此我將串接語法寫在cellForRowAt indexPath 的func中</p><pre><strong>override</strong> <strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {</pre><pre><strong>let</strong> cell = tableView.dequeueReusableCell(withIdentifier: &quot;ladySongsCell&quot;, for: indexPath)</pre><pre>//key1</pre><pre><strong>if</strong> <strong>let</strong> urlStr = String( &quot;https://www.googleapis.com/customsearch/v1?cx=014436186619858147575:7btb6tfbffm&amp;key=AIzaSyDa01sgwqqUuVzv73Gd2RBFdiqGV5192As&amp;q=&quot; + singerLady[indexPath.section] + &quot;&amp;siteSearch=mojim.com&quot;).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)</pre><pre>{</pre><pre><strong>if</strong> <strong>let</strong> url = URL(string: urlStr) {</pre><pre><strong>let</strong> task = URLSession.shared.dataTask(with: url) { (data, response, error) <strong>in</strong></pre><pre><strong>let</strong> decoder = JSONDecoder()</pre><pre><strong>if</strong> <strong>let</strong> data = data, <strong>let</strong> mojimJson = <strong>try</strong>? decoder.decode(Mojim.<strong>self</strong>, from: data){</pre><pre><strong>let</strong> songs = mojimJson.items[indexPath.row].title</pre><pre><strong>let</strong> songName = songs.components(separatedBy: &quot;歌詞&quot;)</pre><pre>DispatchQueue.main.async {</pre><pre>cell.textLabel?.text = songName[0]</pre><pre>}}}</pre><pre>task.resume()</pre><pre>}}</pre><pre><strong>return</strong> cell</pre><pre>}</pre><p>但在這邊串接的資料我研究不出如何儲存再利用，表格點選之後展示在下一頁的部分，我只好在該頁再次重新串接...</p><p>而資料傳遞的部分，只傳遞所選cell的section title跟row的數值：</p><pre><strong>@IBSegueAction</strong> <strong>func</strong> ladySongs(<strong>_</strong> coder: NSCoder) -&gt; SecondViewController? {</pre><pre><strong>let</strong> indexPath = <strong>self</strong>.tableView.indexPathForSelectedRow</pre><pre><strong>let</strong> cellID:Int = <strong>self</strong>.tableView.indexPathForSelectedRow!.row</pre><pre><strong>let</strong> sectionA:Int = indexPath!.section</pre><pre><strong>let</strong> controller = SecondViewController(coder: coder)</pre><pre>controller?.number = cellID</pre><pre>controller?.singer = singerLady[sectionA]</pre><pre><strong>return</strong> controller</pre><pre>}</pre><p>下一頁語法：</p><pre><strong>class</strong> SecondViewController: UIViewController {</pre><pre><strong>var</strong> singer:String?</pre><pre><strong>var</strong> number:Int?</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> titleLabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> lyricLabel: UILabel!</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>// key9</pre><pre><strong>if</strong> <strong>let</strong> urlStr = String( &quot;https://www.googleapis.com/customsearch/v1?cx=014436186619858147575:7btb6tfbffm&amp;key=AIzaSyC6nxpw0jRP9c9vd_oKScmbWmSLUeN7xJw&amp;q=&quot; + singer! + &quot;&amp;siteSearch=mojim.com&quot;).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)</pre><pre>{</pre><pre><strong>if</strong> <strong>let</strong> url = URL(string: urlStr) {</pre><pre><strong>let</strong> task = URLSession.shared.dataTask(with: url) { (data, response, error) <strong>in</strong></pre><pre><strong>let</strong> decoder = JSONDecoder()</pre><pre><strong>if</strong> <strong>let</strong> data = data, <strong>let</strong> mojimJson = <strong>try</strong>? decoder.decode(Mojim.<strong>self</strong>, from: data){</pre><pre><strong>let</strong> song = mojimJson.items[<strong>self</strong>.number!].title</pre><pre><strong>let</strong> songName = song.components(separatedBy: &quot;歌詞&quot;)</pre><pre><strong>let</strong> lyric = mojimJson.items[<strong>self</strong>.number!].snippet</pre><pre>DispatchQueue.main.async {</pre><pre><strong>self</strong>.titleLabel.text = songName[0] + &quot; &quot; + <strong>self</strong>.singer!</pre><pre><strong>self</strong>.lyricLabel.text = lyric</pre><pre>}}}</pre><pre>task.resume()</pre><pre>}}}</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*sTTWv1yc7irnQIayoWjclQ.gif" /></figure><p>本來還有篩選不要的部分不展示，不過cell的remove跟delete還沒有研究清楚，只好先暫時擱置這個項目。</p><p>Google search API 串接資料有數量限制，所以我在練習途中一直新增更多API key並輪替使用，才能順利測試</p><p><a href="https://developers.google.com/custom-search/v1/overview?source=post_page-----36e5298086e4----------------------">Custom Search JSON API | Custom Search | Google Developers</a></p><p>後來不同地方串接的，我就用不同的API key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*9KBg-lFeEivzGS8eu-JyDA.gif" /></figure><p>（不過測試多次後，有些key串接數量還是會被用盡，若要變成順利使用的App，要怎麼設計我還要再想想……）</p><p>APP內建置search bar ，我本來以為用textfield即可，但是做不出來，網路上找到一篇教學才順利完成，教學參考：</p><p><a href="https://medium.com/@albert1994/swift-4-2-%E5%9C%A8tableview%E4%BD%BF%E7%94%A8uisearchcontroller-c9069f249bfe">Swift 4.2 — 在TableView使用UISearchController</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*Dni9iIS6viRqZ5ZrglYrsw.gif" /></figure><p>但是有不少問題，其中一項是搜尋完成的表格，我無法點選，點選會同取消效果...</p><p>另外換頁後，再換回搜尋頁，不知為何會變黑畫面，總之還有很多不懂的問題，只能先告一段落展示一部分。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*IIZ84di0hG7eOIaA_hLr2A.gif" /></figure><p>github:</p><p><a href="https://github.com/yolanda0213h/mojimAPI">yolanda0213h/mojimAPI</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12e111ebf1b5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-%E7%B7%B4%E7%BF%92%E4%B8%B2%E6%8E%A5%E7%AC%AC%E4%B8%89%E6%96%B9-api-%E4%BB%A5google-custom-search%E5%B1%95%E7%A4%BAmojim%E6%AD%8C%E8%A9%9E-12e111ebf1b5">[iOS study] 練習串接第三方 API，以Google Custom Search展示mojim歌詞</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study] 使用 collection view controller製作照片牆]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-%E4%BD%BF%E7%94%A8-collection-view-controller%E8%A3%BD%E4%BD%9C%E7%85%A7%E7%89%87%E7%89%86-49a31dd178cf?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/49a31dd178cf</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[collection]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Wed, 14 Aug 2019 10:32:08 GMT</pubDate>
            <atom:updated>2019-08-14T15:08:54.887Z</atom:updated>
            <content:encoded><![CDATA[<p>功能需求:</p><p>1 第一頁顯示格子狀(grid)的照片牆。</p><p>2 點選照片後，切換到下一頁顯示大張圖片。</p><p>教學：</p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8-flow-layout-%E7%9A%84-collection-view-%E8%A3%BD%E4%BD%9C%E7%85%A7%E7%89%87%E7%89%86-e31dad55a7ac">利用 flow layout 的 collection view 製作照片牆</a></p><p>格子狀照片牆：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*adtR6Kg1aV9SNMKD4OMzZw.gif" /></figure><p>實作注意事項：</p><p>在<strong>override</strong> <strong>func</strong> collectionView(<strong>_</strong> collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {</p><p><strong>let</strong> cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath)</p><p><strong>return</strong> cell</p><p>更換reuseIdentifier為自己設定的cell identifier（我本次是PhotoCollectionViewCell）</p><p>可直接用 &quot;PhotoCollectionViewCell&quot;</p><p>或是 &quot;\(PhotoCollectionViewCell.self)&quot; （當cell identifier與class 同名）</p><p>然而其實程式有預設</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*ct9FGQcOc4EjQEezuLg62A.png" /></figure><p>可以直接將&quot;Cell&quot; 改成自己設定的cell identifier</p><p>而本次self.collectionView!.register(UICollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier) 是用不到的,</p><p>如果像我使用以下，但是沒有移除上列，將會轉型失敗！</p><pre><strong>private</strong> <strong>let</strong> reuseIdentifier = &quot;PhotoCollectionViewCell&quot;</pre><pre><strong>override</strong> <strong>func</strong> collectionView(<strong>_</strong> collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {</pre><pre><strong>let</strong> cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) <strong>as</strong>! PhotoCollectionViewCell</pre><pre><strong>return</strong> cell</pre><pre>}</pre><p>判斷選取的collectionView的cell，顯示對應的image</p><h4>使用<strong>IBSegueAction</strong></h4><p>首先要確定使用的xcode版本可以拉取segueAction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*uyuv-wZKvh5jPSJwRC-3wA.png" /></figure><p>將cell拉到顯示單張頁面產生segue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*T5i5Rxb8S29w2Elkf_Xpsg.png" /></figure><p>將segue拉到collectionViewController產生@IBSegueAction</p><h4><strong>在顯示單張頁面設定變數</strong></h4><pre><strong>import</strong> UIKit</pre><pre><strong>class</strong> OnePhotoViewController: UIViewController {</pre><pre><strong>var</strong> imageName: String = &quot;&quot;</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> oneImage: UIImageView!</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>oneImage.image = UIImage(named: imageName)</pre><pre>}</pre><pre>}</pre><h4>在IBSegueAction傳輸cell的資料</h4><pre><strong>@IBSegueAction</strong> <strong>func</strong> showDetail(<strong>_</strong> coder: NSCoder) -&gt; OnePhotoViewController? {</pre><pre><strong>let</strong> controller = OnePhotoViewController(coder: coder)</pre><pre><strong>let</strong> cellId = <strong>self</strong>.collectionView.indexPathsForSelectedItems?.first?.row</pre><pre>controller?.imageName = imageNames[cellId!]</pre><pre><strong>return</strong> controller</pre><pre>}</pre><p><strong>self</strong>.collectionView.indexPathsForSelectedItems的資料長相為</p><p>[[section, row]]</p><p>點選切換畫面：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*vgQFQ9Hv--fwOCicG4UueQ.gif" /></figure><p>github:</p><p><a href="https://github.com/yolanda0213h/GridPhotoWall">yolanda0213h/GridPhotoWall</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49a31dd178cf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-%E4%BD%BF%E7%94%A8-collection-view-controller%E8%A3%BD%E4%BD%9C%E7%85%A7%E7%89%87%E7%89%86-49a31dd178cf">[iOS study] 使用 collection view controller製作照片牆</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study] 搭配 UIImagePickerController 選照片]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-%E6%90%AD%E9%85%8D-uiimagepickercontroller-%E9%81%B8%E7%85%A7%E7%89%87-f614b4db795?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/f614b4db795</guid>
            <category><![CDATA[delegate]]></category>
            <category><![CDATA[imagepicker]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Mon, 05 Aug 2019 10:23:14 GMT</pubDate>
            <atom:updated>2019-08-05T15:04:21.736Z</atom:updated>
            <content:encoded><![CDATA[<p>練習delegate, imagePickerController, AlertController</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*vqjlELTZcwz0FHA4a_h42Q.gif" /></figure><p>點選button後跳出<strong><em>由下而上彈出的選單視窗</em></strong></p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E9%A1%AF%E7%A4%BA%E8%AD%A6%E5%91%8A%E8%A8%8A%E6%81%AF%E5%92%8C%E9%81%B8%E5%96%AE%E7%9A%84-uialertcontroller-a7548b606eea">顯示警告訊息和選單的 UIAlertController</a></p><pre><strong>@IBAction</strong> <strong>func</strong> ImageButton(<strong>_</strong> sender: UIButton) {</pre><pre><strong>let</strong> controller = UIAlertController(title: <strong>nil</strong>, message: <strong>nil</strong>, preferredStyle: .actionSheet)</pre><pre><strong>let</strong> cameraAction = UIAlertAction(title: &quot;開啟相機拍照&quot;, style: .default) { (<strong>_</strong>) <strong>in</strong></pre><pre><strong>...</strong></pre><pre>}</pre><pre><strong>let</strong> libraryAction = UIAlertAction(title: &quot;從相簿中選擇&quot;, style: .default) { (<strong>_</strong>) <strong>in</strong></pre><pre><strong>...</strong></pre><pre>}</pre><pre><strong>let</strong> deleteAction = UIAlertAction(title: &quot;刪除&quot;, style: .destructive) { (<strong>_</strong>) <strong>in</strong></pre><pre>sender.setImage(UIImage(named: &quot;user&quot;), for: .normal)</pre><pre>}</pre><pre><strong>let</strong> cancelAction = UIAlertAction(title: &quot;取消&quot;, style: .cancel, handler: <strong>nil</strong>)</pre><pre>controller.addAction(cameraAction)</pre><pre>controller.addAction(libraryAction)</pre><pre>controller.addAction(deleteAction)</pre><pre>controller.addAction(cancelAction)</pre><pre>present(controller, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>}</pre><p>從相簿中選擇照片</p><pre><strong>func</strong> photopicker(){</pre><pre><strong>let</strong> photoController = UIImagePickerController()</pre><pre>photoController.delegate = <strong>self</strong></pre><pre>photoController.sourceType = .photoLibrary</pre><pre>present(photoController, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>}</pre><pre><strong>@IBAction</strong> <strong>func</strong> ImageButton(<strong>_</strong> sender: UIButton) {<br>...<br>}</pre><pre><strong>func</strong> imagePickerController(<strong>_</strong> picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : <strong>Any</strong>]) {</pre><pre><strong>let</strong> image = info[.originalImage] <strong>as</strong>? UIImage</pre><pre>buttonImage.setImage(image, for: .normal)</pre><pre>dismiss(animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>}</pre><p>開啟相機功能，無法模擬器測試，但是我的iphone版本跟xcode版本無法測試......(只好這次先展示相簿就好，改天再試相機）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*hgZ1mYU1jHr3CkIPp0xRcg.png" /></figure><p>github:</p><p><a href="https://github.com/yolanda0213h/ImageDelegate">yolanda0213h/ImageDelegate</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f614b4db795" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-%E6%90%AD%E9%85%8D-uiimagepickercontroller-%E9%81%B8%E7%85%A7%E7%89%87-f614b4db795">[iOS study] 搭配 UIImagePickerController 選照片</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study] 情歌對嗆的聊天室畫面 — cell 的 auto layout]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-%E6%83%85%E6%AD%8C%E5%B0%8D%E5%97%86%E7%9A%84%E8%81%8A%E5%A4%A9%E5%AE%A4%E7%95%AB%E9%9D%A2-cell-%E7%9A%84-auto-layout-68d1cb183cc7?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/68d1cb183cc7</guid>
            <category><![CDATA[autolayout]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Mon, 01 Jul 2019 08:39:08 GMT</pubDate>
            <atom:updated>2019-07-01T08:39:08.880Z</atom:updated>
            <content:encoded><![CDATA[<h3>[iOS study] 情歌對嗆的聊天室畫面 — cell 的 auto layout</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*Gf_R6CDSmOpoPfqUVuVQFw.gif" /></figure><p>用歌詞對唱聊天室畫面，學習定義 UITableViewDataSource 的相關 function ＆ cell 的 auto layout。由於我不想在程式裡用array直接指定，參考飲料清單方式，將下載的歌詞txt編輯好匯入後，讀取資料來應用。</p><p>swift struct</p><pre><strong>import</strong> Foundation</pre><pre><strong>struct</strong> Lyrics {</pre><pre><strong>var</strong> songTime:String</pre><pre><strong>var</strong> songRole:String</pre><pre><strong>var</strong> songLyric:String</pre><pre>}</pre><p>tableview controller</p><pre><strong>var</strong> songTimes = [String]()</pre><pre><strong>var</strong> songRoles = [String]()</pre><pre><strong>var</strong> songLyrics = [String]()</pre><pre><strong>var</strong> lyrics = [Lyrics]()</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre><strong>if</strong> <strong>let</strong> asset = NSDataAsset(name: &quot;whoAreYouAfraid&quot;), <strong>let</strong> content =</pre><pre>String(data: asset.data, encoding: .utf8) {</pre><pre><strong>let</strong> array0 = content.components(separatedBy: &quot;\n&quot;)</pre><pre>print(array0[0], array0[1])</pre><pre>print(array0.count)</pre><pre><strong>for</strong> lyric <strong>in</strong> array0 {</pre><pre><strong>let</strong> array = lyric.components(separatedBy: &quot;,&quot;)</pre><pre>songTimes.append(array[0])</pre><pre>songRoles.append(array[1])</pre><pre>songLyrics.append(array[2])</pre><pre>}</pre><pre><strong>for</strong> i <strong>in</strong> 0...array0.count-1 {</pre><pre>lyrics.append(Lyrics(songTime: songTimes[i], songRole: songRoles[i], songLyric: songLyrics[i]))</pre><pre>}</pre><pre>}</pre><p>tips：善用print可以測試各階段是否成功，以及出現的順序；txt的檔案編碼錯誤可能導致讀取失敗，建議多試試txt檔案重新建立及匯入</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*AOO5jXZU5eIluB9Kd77sqQ.png" /></figure><p>語法參考自：<br><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E6%95%99%E5%AE%A4/100%E9%81%93iosapp%E8%AC%8E%E9%A1%8C-20-%E8%A8%82%E9%A3%B2%E6%96%99-app-%E4%B8%8A%E5%82%B3%E8%B3%87%E6%96%99%E5%88%B0%E5%BE%8C%E5%8F%B0-f2e74e3bca91">https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E6%95%99%E5%AE%A4/100%E9%81%93iosapp%E8%AC%8E%E9%A1%8C-20-%E8%A8%82%E9%A3%B2%E6%96%99-app-%E4%B8%8A%E5%82%B3%E8%B3%87%E6%96%99%E5%88%B0%E5%BE%8C%E5%8F%B0-f2e74e3bca91</a></p><p><strong>將讀取的資料呈現到tableview的cell</strong></p><p>由於對唱有兩個角色的不同格式設計，新增兩個file class的cell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/158/1*ctjAT04iyqxJP1ONKojwDQ.png" /></figure><p>storyboard建立兩個cell並將class指定到對應的名稱</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nLhVWBtqBwqYNN4gLjQC8g.png" /></figure><p>兩個cell的identifier分別給予命名</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vSVulBlwbyaXMdQnluSyAg.png" /></figure><p>把元件拉入cell的swift</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*d9WRffJM1ckGAlWJEtYmtQ.png" /></figure><p>程式：</p><pre><strong>override</strong> <strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {</pre><pre><strong>return</strong> lyrics.count</pre><pre>}</pre><pre><strong>override</strong> <strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {</pre><pre><strong>let</strong> tableLyric = lyrics[indexPath.row]</pre><pre>print(tableLyric.songRole)</pre><pre><strong>if</strong> tableLyric.songRole == &quot; 女&quot; {</pre><pre><strong>let</strong> cell = tableView.dequeueReusableCell(withIdentifier: &quot;girlChat&quot;, for: indexPath) <strong>as</strong>! girlTableViewCell</pre><pre>cell.lyricLabel.text = tableLyric.songLyric</pre><pre>print(lyrics[10].songLyric)</pre><pre><strong>return</strong> cell</pre><pre>} <strong>else</strong> {</pre><pre><strong>let</strong> cell = tableView.dequeueReusableCell(withIdentifier: &quot;boyChat&quot;, for: indexPath) <strong>as</strong>! boyTableViewCell</pre><pre>cell.roleImage.image = UIImage(named: &quot;role0&quot;)</pre><pre>cell.lyricLabel.text = tableLyric.songLyric</pre><pre>print(lyrics[11].songLyric)</pre><pre><strong>return</strong> cell</pre><pre>}</pre><pre>}</pre><p>tip: 我的資料內有 空格，導致一開始辨識有問題，若遇類似資料辨識不到，可朝此方向調查。本次我配合不修改資料，而是在程式內先以tableLyric.songRole == “ 女” 來完成分類。</p><p><strong>cell的auto layout</strong></p><p>將label的lines改為0，並將line break改為wrap</p><p>設定label的上下左右邊界</p><p>為使label的寬度可隨文字內容伸縮，多水平添加一個無內容的label</p><p>將無內容label設定邊界，並將horizontal數值改小</p><p>如此，有內容label就可依據文字內容橫向加長，多行狀況的cell也會向下加長（不會遮蔽到cell內的內容）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AglrKgMZAjZw_XFGm53yYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDk1cIzT3b_rQsRDhglchA.png" /></figure><p>網路上的歌詞常見有音樂時間序，感覺也可以運用timer練習，但是這次花很多時間研究以上，timer這次就先跳過了。</p><p>github:</p><p><a href="https://github.com/yolanda0213h/whoAreYouAraid">yolanda0213h/whoAreYouAraid</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68d1cb183cc7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-%E6%83%85%E6%AD%8C%E5%B0%8D%E5%97%86%E7%9A%84%E8%81%8A%E5%A4%A9%E5%AE%A4%E7%95%AB%E9%9D%A2-cell-%E7%9A%84-auto-layout-68d1cb183cc7">[iOS study] 情歌對嗆的聊天室畫面 — cell 的 auto layout</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study] scroll view delegate分頁和圖片縮放-清明上河圖]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-scroll-view-delegate%E5%88%86%E9%A0%81%E5%92%8C%E5%9C%96%E7%89%87%E7%B8%AE%E6%94%BE-%E6%B8%85%E6%98%8E%E4%B8%8A%E6%B2%B3%E5%9C%96-67f2e1a00e99?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/67f2e1a00e99</guid>
            <category><![CDATA[delegate]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[scroll]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Wed, 22 May 2019 04:52:44 GMT</pubDate>
            <atom:updated>2019-05-22T04:52:44.987Z</atom:updated>
            <content:encoded><![CDATA[<p>研究 UIScrollViewDelegate protocol 的相關功能，從故宮網上截了清明上河圖做範例練習。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*7FphEtP68mOGo6wmTGVUZw.png" /><figcaption>取自故宮的清明上河圖之其中一部</figcaption></figure><p>在storyboard將imageView放入scrollView(detail), 再將scrollView(detail)放入view，再將view放入scrollView(page)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*PxkoTrKFMTQDHF_ZM9w1wQ.png" /></figure><p>view的width, height設定不能超過10000, 但是scrollView的contentSize可以</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*sMf2mRrLyFxXqSkhDJuGJg.png" /></figure><pre>Main.storyboard: error: Illegal Configuration: Interface Builder does not support UIView sizes larger than 10,000 by 10,000.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*szbtiNyqN7p4FvK4la40NA.png" /></figure><p>將imageView, scrollView(detail), scrollView(page), pageControl拉出outlet</p><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> pageControl: UIPageControl!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> pageScroll: UIScrollView!</pre><pre><strong>@IBOutlet</strong> <strong>var</strong> detailScroll: [UIScrollView]!</pre><pre><strong>@IBOutlet</strong> <strong>var</strong> imageView: [UIImageView]!</pre><h4>利用 page control 的小圓點顯示目前在第幾頁</h4><blockquote>捲動分頁時，pageControl的圓點隨之變動</blockquote><p>要設定分頁scrollView的delegate,</p><p>可寫程式也可在storyboard設定，這裡在storyboard拉取：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*ZtMFEKNUdocGZDYqJDF8TQ.png" /></figure><p>需在viewcontroller加上protocol的UIScrollViewDelegate</p><pre><strong>class</strong> ViewController: UIViewController,UIScrollViewDelegate</pre><p>再設定遵從的func,</p><p>可以查到跟捲動相關的func 如下：</p><pre>Responding to Scrolling and Dragging</pre><pre><a href="/service/apple-reference-documentation://hsx8lv1XWM">func scrollViewDidScroll(UIScrollView)</a></pre><pre>Tells the delegate when the user scrolls the content view within the receiver.</pre><pre><a href="/service/apple-reference-documentation://hsQ0DHC2ZE">func scrollViewWillBeginDragging(UIScrollView)</a></pre><pre>Tells the delegate when the scroll view is about to start scrolling the content.</pre><pre><a href="/service/apple-reference-documentation://hskVic0cDa">func scrollViewWillEndDragging(UIScrollView, withVelocity: CGPoint, targetContentOffset: UnsafeMutablePointer&lt;CGPoint&gt;)</a></pre><pre>Tells the delegate when the user finishes scrolling the content.</pre><pre><a href="/service/apple-reference-documentation://hsEIUu1oZJ">func scrollViewDidEndDragging(UIScrollView, willDecelerate: Bool)</a></pre><pre>Tells the delegate when dragging ended in the scroll view.</pre><pre><a href="/service/apple-reference-documentation://hsHpw3QDqA">func scrollViewShouldScrollToTop(UIScrollView) -&gt; Bool</a></pre><pre>Asks the delegate if the scroll view should scroll to the top of the content.</pre><pre><a href="/service/apple-reference-documentation://hsHNZ1wTKe">func scrollViewDidScrollToTop(UIScrollView)</a></pre><pre>Tells the delegate that the scroll view scrolled to the top of the content.</pre><pre><a href="/service/apple-reference-documentation://hs8Kia9mbN">func scrollViewWillBeginDecelerating(UIScrollView)</a></pre><pre>Tells the delegate that the scroll view is starting to decelerate the scrolling movement.</pre><pre><a href="/service/apple-reference-documentation://hsf6u1fcxT">func scrollViewDidEndDecelerating(UIScrollView)</a></pre><pre>Tells the delegate that the scroll view has ended decelerating the scrolling movement.</pre><p>由於我用清明上河圖為範例，所以想讓分頁圖片保持連續而不勾選paging Enabled, protocol也直接選用scrollViewDidScroll</p><p>設定在下一頁捲動3分之2時,小圓點就切換，語法如下：</p><pre><strong>func</strong> scrollViewDidScroll(<strong>_</strong> scrollView: UIScrollView) {</pre><pre><strong>let</strong> frameWidth = Int(pageScroll.frame.size.width)</pre><pre><strong>let</strong> contentOffsetX = Int(pageScroll.contentOffset.x) + frameWidth / 3</pre><pre><strong>let</strong> currentPage = contentOffsetX / frameWidth</pre><pre>pageControl.currentPage = currentPage</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*zWZCfSbOJdr7M69BgUAxZA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*28GgZ10n-ASdJGR2YXA5Tg.gif" /></figure><blockquote>pageControl的圓點左右變動時，scrollView分頁隨之變動</blockquote><pre><strong>@IBAction</strong> <strong>func</strong> pageControlFunc(<strong>_</strong> sender: UIPageControl) {</pre><pre>pageScroll.contentOffset.x = detailScroll[sender.currentPage].frame.origin.x</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*Z_aSIcvl9qPuFcyo8ZUkAA.gif" /></figure><h4>實作可分頁和縮放大小的照片瀏覽頁面</h4><p>用pageScroll設定了可捲動分頁，接下來用detailScroll設定可縮放大小的照片瀏覽頁面。</p><p>detailScroll的縮放比例跟delegate同樣有用程式跟用storyboard兩種方法，這次用程式設定：</p><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre><strong>for</strong> i <strong>in</strong> 0...11{</pre><pre>detailScroll[i].delegate = <strong>self</strong></pre><pre>detailScroll[i].maximumZoomScale = 5</pre><pre>detailScroll[i].minimumZoomScale = 1</pre><pre>detailScroll[i].zoomScale = 1</pre><pre>}</pre><pre>}</pre><p>遵從選用跟縮放相關的func</p><pre>Managing Zooming</pre><pre><a href="/service/apple-reference-documentation://hsQTp6Codt">func viewForZooming(in: UIScrollView) -&gt; UIView?</a></pre><pre>Asks the delegate for the view to scale when zooming is about to occur in the scroll view.</pre><p>在程式內return imageView即可呈現縮放效果。</p><p>但因我的分頁不勾選paging Enabled，所以縮放時畫面會有點奇怪</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*EmSjvuQSakNIJi5iW6i3hA.gif" /></figure><p>因此需在return前多加一行程式：</p><pre><strong>func</strong> viewForZooming(in scrollView: UIScrollView) -&gt; UIView? {</pre><pre>pageScroll.contentOffset.x = detailScroll[pageControl.currentPage].frame.origin.x</pre><pre><strong>return</strong> imageView[pageControl.currentPage]</pre><pre>}</pre><p>如此縮放一張圖時，pageScroll位置為指定在該張圖的scrollView</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*nqE8psj47wpyGNoaqmkbgQ.gif" /></figure><p>這樣就可以觀看清明上河圖的細節了</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*Z9uz5Qp3H9HirOk2iMoccg.gif" /></figure><p>（只是不曉得為何我的最後一頁圖無法縮放）</p><p>github:</p><p><a href="https://github.com/yolanda0213h/scrollDelegate">yolanda0213h/scrollDelegate</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67f2e1a00e99" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-scroll-view-delegate%E5%88%86%E9%A0%81%E5%92%8C%E5%9C%96%E7%89%87%E7%B8%AE%E6%94%BE-%E6%B8%85%E6%98%8E%E4%B8%8A%E6%B2%B3%E5%9C%96-67f2e1a00e99">[iOS study] scroll view delegate分頁和圖片縮放-清明上河圖</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[iOS study] 練習在 Playground 用 JSONDecoder 將 JSON 轉換成自訂型別，至少練習三種 JSON API]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/ios-study-%E7%B7%B4%E7%BF%92%E5%9C%A8-playground-%E7%94%A8-jsondecoder-%E5%B0%87-json-%E8%BD%89%E6%8F%9B%E6%88%90%E8%87%AA%E8%A8%82%E5%9E%8B%E5%88%A5-%E8%87%B3%E5%B0%91%E7%B7%B4%E7%BF%92%E4%B8%89%E7%A8%AE-json-api-d93bcb5c5ebe?source=rss-6da9a0dc2159------2</link>
            <guid isPermaLink="false">https://medium.com/p/d93bcb5c5ebe</guid>
            <category><![CDATA[json]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Yolanda H.]]></dc:creator>
            <pubDate>Sun, 21 Apr 2019 17:06:47 GMT</pubDate>
            <atom:updated>2019-04-21T17:07:52.257Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>1 利用 </strong><a href="https://rss.itunes.apple.com/en-us"><strong>RSS Generator</strong></a><strong> 產生 API 抓取 JSON 資料</strong></p><p><a href="https://rss.itunes.apple.com/api/v1/tw/movies/top-movies/all/25/explicit.json">https://rss.itunes.apple.com/api/v1/tw/movies/top-movies/all/25/explicit.json</a></p><p>一開始的程式碼跑出來一直不成功，後來運用do catch去找到底錯在哪裡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*xdI-K310muwLbopA5E1A3A.png" /></figure><p>最後一句顯示：期望解碼Double但是找到string，不過我設定的並沒有Double，後來試試把比較特別的Date先取消</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*gZq_FVuCjKelJs8qVUBQlg.png" /></figure><p>這樣就成功了！！</p><p><strong>2 GitHub user API</strong></p><p>比方 <a href="https://api.github.com/users/caspyin">https://api.github.com/users/caspyin</a></p><p>這次的資料裡也有時間，發現需要多加一條</p><pre><strong>decoder.dateDecodingStrategy = .iso8601</strong></pre><p>這樣就可以成功轉換</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*75-D_yJVsdXQ8L7X78btJQ.png" /></figure><p><strong>3 foursquare API</strong></p><p>研究 <a href="https://developer.foursquare.com/docs/api/venues/search">https://developer.foursquare.com/docs/api/venues/search</a></p><p>首先要註冊foursquare帳號，可以用facebook帳號快速授權註冊</p><p>其次需要新建app資料（我連結是輸入medium的也可以通過，所以新建的資料目的是練習測試，可以先不用擔心資料的認真程度，到信用卡頁面只要返回就好）</p><p>新建一個app資料後就可以得到自己的Client ID以及Client Secret，樣子如下圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q0OyMxE3XtFS7Hnw5APQ0w.png" /><figcaption>圖片來源：<a href="https://ithelp.ithome.com.tw/articles/10197108"><strong>chiaroluna</strong></a></figcaption></figure><p>接下來可以設定取得API的url</p><pre>https://api.foursquare.com/v2/venues/search   <br>?ll=40.7,-74<br>&amp;client_id=CLIENT_ID   <br>&amp;client_secret=CLIENT_SECRET   <br>&amp;v=YYYYMMDD</pre><p>ll= 後面的數字是經緯度，foursquare我還是不熟悉用，改用googleMapt查經緯度，我查了上課地點附近的松江南京捷運站</p><ol><li>在地圖上的所需地點或區域按一下滑鼠右鍵。</li><li>選取 [這是哪裡？]。</li><li>底部會顯示一張包含座標的資訊卡。</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ed1e5a3098e958b77c35e0b917cb121/href">https://medium.com/media/6ed1e5a3098e958b77c35e0b917cb121/href</a></iframe><p>string要留意不要有空格，不然string生成看起來正常，但是url會變成nil</p><p>把問題都排除後就可以成功抓取資料囉！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*YKaOf-XAnU7DHxb_bk9Gag.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d93bcb5c5ebe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/ios-study-%E7%B7%B4%E7%BF%92%E5%9C%A8-playground-%E7%94%A8-jsondecoder-%E5%B0%87-json-%E8%BD%89%E6%8F%9B%E6%88%90%E8%87%AA%E8%A8%82%E5%9E%8B%E5%88%A5-%E8%87%B3%E5%B0%91%E7%B7%B4%E7%BF%92%E4%B8%89%E7%A8%AE-json-api-d93bcb5c5ebe">[iOS study] 練習在 Playground 用 JSONDecoder 將 JSON 轉換成自訂型別，至少練習三種 JSON API</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>