<?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 wyatt Peng on Medium]]></title>
        <description><![CDATA[Stories by wyatt Peng on Medium]]></description>
        <link>https://medium.com/@abnertw?source=rss-6a7617f6685d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*afEIwr6WQkrXuURq</url>
            <title>Stories by wyatt Peng on Medium</title>
            <link>https://medium.com/@abnertw?source=rss-6a7617f6685d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 10:08:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abnertw/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/peter-pan-swift-ios-class/%E5%8F%B0%E7%81%A3%E5%B0%8F%E7%9F%A5%E8%AD%98-%E5%95%8F%E7%AD%94%E9%A1%8C-9320315fdd2?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9320315fdd2</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Mon, 25 Jan 2021 08:17:43 GMT</pubDate>
            <atom:updated>2021-01-25T10:59:56.101Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>此次作業使用了struct與array兩者間的應用</strong></blockquote><p><strong>以struct作為array的主架構，架構內包含了題目與答案。之後再宣告一個陣列，並將此架構運用於陣列中。</strong></p><p><strong>為何使用struct? 用class就好了不行嗎?</strong></p><p><strong>與class相比之下，struct可讓我們的程式執行的更為快速，所以簡單且少量的資料可使用struct來代勞。</strong></p><blockquote><strong>IBOutlet與IBAction：</strong></blockquote><p><strong>IBOutlet：label *3(題數標籤、問題標籤與答案標籤)</strong></p><p><strong>IBAction：button *3(下一題、顯示答案與再玩一次)</strong></p><p><strong><em>連結完後，即可開始寫程式啦!</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*wPzePqwEU1jgSWHnebalhQ.png" /></figure><blockquote><strong>程式的部分</strong></blockquote><p><strong>這次使用了隨機選題的shuffle( )，在一開始的viewDidLoad及再玩一次鍵中加入了shuffle( )隨機功能。另外，也建立了2個常用的func指令(nextQuestion與again)來讓程式簡單化。</strong></p><p><strong><em>完整程式碼如下：</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*axVLG_mK-LT6Ndw4wTnK9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hezItVR5f3Xpo1GC3paOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0cwcqRJv9qljoc9EhI_BGg.png" /></figure><p><strong><em>影片錄製如下：</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstreamable.com%2Fo%2F0vi04a&amp;display_name=Streamable&amp;url=https%3A%2F%2Fstreamable.com%2F0vi04a&amp;image=https%3A%2F%2Fcdn-cf-east.streamable.com%2Fimage%2F0vi04a.jpg%3FExpires%3D1611819840%26Signature%3DVrNZdxZk-9tqMT82LzaIAQhQygR9kZDOwicZP6PbsY31k10FExHGdOg-6tZObhTOSNLPCvW2fxd3fyLFlD0fyQ%7EHpY852WvRwn-lRUochArIKmLcfu0WkpqQeRckOOp7g2opCLBei1MqQ-rLDWb6qULm99pvw2Kq6APkslkIFPL2ghtCGzoRLOi9sXvgrRAL5qy2HxFIbsQNxLS2Qe5Aw4DC8p7Jg2MN4is7PWtDkkkR6kqjxCubmR0qhN9uoxYC3D29luiiVLcmV-gN2qo%7EpqrAyxQKV2xrPZIrph3MrpdH%7EFEJ6L8a0vHvuOGeY%7EbRR7WEkLyzB66NSopUa0na0g__%26Key-Pair-Id%3DAPKAIEYUVEN4EVB2OKEQ&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=streamable" width="330" height="718" frameborder="0" scrolling="no"><a href="https://medium.com/media/53c3eef6b7de0a41e61835170daeb299/href">https://medium.com/media/53c3eef6b7de0a41e61835170daeb299/href</a></iframe><p><strong><em>gitHub</em></strong></p><p><a href="https://github.com/Abnertw/QnA_4">Abnertw/QnA_4</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9320315fdd2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%8F%B0%E7%81%A3%E5%B0%8F%E7%9F%A5%E8%AD%98-%E5%95%8F%E7%AD%94%E9%A1%8C-9320315fdd2">台灣小知識(問答題)</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[旅遊商城App-學習UIStepper]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E6%97%85%E9%81%8A%E5%95%86%E5%9F%8Eapp-%E5%AD%B8%E7%BF%92uistepper-eaa4fd57c558?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaa4fd57c558</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Sat, 23 Jan 2021 05:10:08 GMT</pubDate>
            <atom:updated>2021-01-23T15:17:02.836Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0FAQu6CaCK_aE2ZOH_prwA.png" /></figure><p><strong>此次作業參考了Chou學長/姐，針對購物App的精簡寫法</strong></p><p><strong>此寫法大幅省去了眾多初始值的宣告，與一大堆outlet的連結程式碼</strong></p><blockquote><strong>1. 將所有相關label與stepper，用outlet collection的方式連結</strong></blockquote><blockquote><strong>2. 將所有stepper連結至同一個Action中</strong></blockquote><blockquote>3. <strong>運用陣列存放商品價格</strong></blockquote><blockquote><strong>4. 用storyboard設定stepper的Tag值(用此值作為outlet collection的index值)</strong></blockquote><blockquote><strong>(一個stepper的section就是一個Tag，可和array的index一樣，由0開始編號)</strong></blockquote><blockquote><strong>5. 用for搭配enumerated( )。注意Array和outlet collection商品順序要一致</strong></blockquote><blockquote><strong>6. 使用new file在storyboard中製作，並設定stepper的最小、大值與Tag值</strong></blockquote><p><strong>#</strong> <strong><em>記得要將tabel view cell的selection改成none，不然cell會反灰。</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%E6%95%99%E5%AE%A4/100%E9%81%93iosapp%E8%AC%8E%E9%A1%8C-11%E7%98%8B%E7%8B%82%E8%B3%BC%E7%89%A9-app-uistepper-%E5%92%8C%E6%95%B8%E5%AD%97%E8%AE%8A%E5%AD%97%E4%B8%B2%E7%B7%B4%E7%BF%92-86197a3c3215">100道iOSApp謎題#11瘋狂購物 App — UIStepper 和數字變字串練習</a></p><h3><strong>程式碼與成品之錄製影片如下：</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xEcqXGHlE-zMUD9O7pJ_IQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3lncKYpj_fnrMzLL5ln9sA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jR3zzoJBgmygflzVAIDi-w.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstreamable.com%2Fo%2F4r1lhg&amp;display_name=Streamable&amp;url=https%3A%2F%2Fstreamable.com%2F4r1lhg&amp;image=https%3A%2F%2Fcdn-cf-east.streamable.com%2Fimage%2F4r1lhg.jpg%3FExpires%3D1611591240%26Signature%3DdUyFnatKfjXB-8Ofavb030m4C6n9xUJDk5N2l%7EkRBxDjqsYuDbVihQ9eWn75MQ7MmSo%7EGp8aCwOJl-oJ61Koc8vwDRvSicKjpKpzoZWV1wHUcp4pcZT-FReuNS6Ib1l7tfLdXRpKTO--o49BvirDGgASMlPVCaJEOXaNIULT1vugJyEI0VB7brCIyK50xgDSN2RAWq6TL6VYyjUso4meO4JYbAiHtWaTsXJB32pGQLT%7EsS0ejS%7EfqNxrAc7iBCuRuhM-BwPbYTVQ%7Eo2iAx47rGcrPDaB74XQjUUpDmdkvuVV%7EkFMcbfsLFBYFHA86%7EKFcpJpHqlQcSkE2xjq1PTL5A__%26Key-Pair-Id%3DAPKAIEYUVEN4EVB2OKEQ&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=streamable" width="330" height="718" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b38c56ccf4d8756950a393b60cae769/href">https://medium.com/media/8b38c56ccf4d8756950a393b60cae769/href</a></iframe><p><a href="https://github.com/Abnertw/TravelShopping_3">Abnertw/TravelShopping_3</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaa4fd57c558" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E6%97%85%E9%81%8A%E5%95%86%E5%9F%8Eapp-%E5%AD%B8%E7%BF%92uistepper-eaa4fd57c558">旅遊商城App-學習UIStepper</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[玩遊戲吧! (while loop)]]></title>
            <link>https://abnertw.medium.com/%E7%8E%A9%E9%81%8A%E6%88%B2%E5%90%A7-while-loop-2c4b421fc907?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c4b421fc907</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Thu, 21 Jan 2021 04:14:25 GMT</pubDate>
            <atom:updated>2021-01-21T04:14:25.761Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>更加燒腦的小遊戲</em></strong></p><blockquote><strong>while loop有別於for loop，除了一樣是迴圈外，還多了條件碼的規則。條件為true時，則永不停止的執行，直到條件為false才會停下來。所以在使用while loop時，也要格外的注意。所以在寫while loop時，也要一併先想好要如果將它停下來，不然閃退就會找上我們。</strong></blockquote><p><strong>關卡共有9關，1~6關是純while關卡，但也更常使用到!(相反)來通關，例如：第2關(如下圖)。而第7~9關則是nested while的關卡，更加複雜許多。但和for loop一樣，先寫內迴圈(處理最小單位)再寫外迴圈。若遇到重複的程式碼或重複的指令時，再使用for或func中就可以了。</strong></p><p><strong>例如：第五關(如下圖)</strong></p><p><strong>若是沒有在寶石上的話，就往前走(內迴圈)，所以若有在寶石上的話，就會執行外迴圈的程式碼，直到收集到所有的寶石即過關而停止。</strong></p><p><strong>又若沒有受到阻的話，就收集寶石並左轉(外迴圈)。</strong></p><h4><strong><em>另外，此遊戲也貼心的在左下角設置了，可”逐步執行程式碼”的功能，讓我們可以觀看程式是如何一步步執行的。</em></strong></h4><h3><strong>第二關：</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*iWVD7Lyau50ihHRAkY1Mlg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*s47cSmJOT3l6jfPNu5p2qw.png" /></figure><h3>第五關：</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*xsAmPAzy5ZQ0cFk2tlQF-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*MXMa9Qwcroi5A2QK2G8D9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*PDHy3aworTMyWr7tfvT0KA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c4b421fc907" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[玩遊戲吧! (for loop)]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E7%8E%A9%E9%81%8A%E6%88%B2%E5%90%A7-for-loop-8edbc2595f16?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8edbc2595f16</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Tue, 19 Jan 2021 03:08:52 GMT</pubDate>
            <atom:updated>2021-01-19T09:52:50.420Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FurXABvtAq3AQtCtnk4Wvg.png" /></figure><p><strong><em>Apple很貼心，還特地為程式語法設計遊戲，讓我們透過遊戲可以更加了解其用法。</em></strong></p><h4><strong>for loop總共有7個關卡</strong></h4><p><strong>第1、2關只要找出一定的規律後，再用for loop的range重複該動作即可。</strong></p><p><strong>第3關開始，除了使用for loop來執行以外，另外還多加了func的功能(當然也可以不使用)，可以讓我們借由func來解決許多重複的指令，並讓for loop的程式碼簡單化。例如：第六關(如下圖)</strong></p><p><strong><em>觀念：使用多個func來一一拆解成每個小步驟，再由for loop去執行。</em></strong></p><p><strong>例如：1個func為拿取寶石，1個func負責將開關打開，再1個func負責迴轉(turn around)的功能，然後再由for loop去執行。</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*zznH0_4KyFdOVCRlZeAtcg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*nunS5WDOzv0Mshpw6UJmRg.png" /></figure><p><strong>當然，也可直接將for loop寫於func的大括號內，</strong></p><p><strong>例如:第四關，不過若要執行的話，就必須呼叫func了。</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*XcJgMqeeMWm-hh1AjI6TIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*IsTwSSoAaGiROCeTJMT14w.png" /></figure><p><strong><em>當然，每個人的想法與寫法皆有不同，只要能達到自己想要的功能即可，以上僅供參考。</em></strong></p><h3><em>遊玩心得：</em></h3><h4><strong><em>確實有點燒腦，不過更重要的是，要能理解如何運用for loop與func。個人心得，用多個func來將每個重複的小步驟一一拆解，再用for loop去執行。</em></strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8edbc2595f16" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%8E%A9%E9%81%8A%E6%88%B2%E5%90%A7-for-loop-8edbc2595f16">玩遊戲吧! (for loop)</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[獨家記憶(十年)]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E7%8D%A8%E5%AE%B6%E8%A8%98%E6%86%B6-%E5%8D%81%E5%B9%B4-e0806d61fd2d?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0806d61fd2d</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Mon, 18 Jan 2021 02:50:44 GMT</pubDate>
            <atom:updated>2021-01-19T01:01:19.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>練習透過switch 將datePicker、slider與imageView做連動</h3><h3>使用元件:</h3><p><strong>switch, slider, datePicker, label, imageView、navigation controller等</strong></p><p><strong>在storyboard中將所有元件編排好，並設定slider的初始值、最小值與最大值及datePicker的最小日期與最大日期。</strong></p><p><strong>接著，準備將元件連到程式碼中：(按右鍵或2指神功拖曳至程式碼中即可)</strong></p><p><strong><em>IBOutlet =&gt; </em>slider, datePicker, label, imageView</strong></p><p><strong><em>IBAction =&gt; </em>slider, datePicker, switch</strong></p><p><strong>Slider、datePicker, switch(拉線時，要記得更改Type)</strong></p><p><strong>連結完成後，接下來就是寫程式了</strong></p><p><strong>先po上成品的畫面 —</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*-d-X_5WVJocDLNMRyWygNg.png" /></figure><blockquote><strong><em>設計概念：</em></strong></blockquote><blockquote><strong>switch的自動循環播放鈕，預設為開啟。當畫面開啟後，即自動播放，直到使用者撥動開關，將其關掉為止。</strong></blockquote><p><strong>slider、datePicker與imageView將依時間順序做相互連動</strong></p><h3><strong>以下只寫部份的程式碼與概念，完整程式碼會在GitHub中。</strong></h3><blockquote><strong>此次作業基本上，需要了解一下Date(日期)與Timer(計時器)的部份。</strong></blockquote><blockquote><strong>因為有使用到datePicker這個元件，所以要了解Date的概念。除了有Peter</strong></blockquote><blockquote><strong>的今天幾月幾號及指定特定日期的參考外。亦可參考以下的網站。</strong></blockquote><p><a href="https://www.jianshu.com/p/a6275cc54e04">Swift 3 关于Date的一些操作</a></p><p>至於Timer(計時器)的部份，就相對好理解。需要啟動或停止計時器時，再分別寫入程式中即可。以下為部份程式碼。</p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func changeDP(_ sender: UIDatePicker) {<br>        let imageDate = datePicker.date<br>        let dateComponents = Calendar.current.dateComponents(in: TimeZone.current, from: imageDate)<br>        var year = dateComponents.year!<br>        year -= 1<br>        cutePetImageView.image = UIImage(named: yearImages[year])<br>    }<br>    // 先宣告一個常數，並將datePicker的date資料存入常數中，以備使用<br>    // 解釋：若要單獨取得單一項目，例如:我只想要取得年或分或時區的資料等等，<br>    //    則可使用Date另一個系統，即Calendar的components來將Date拆開使用<br>    //    由於我的照片是以一年一張為單位，所以我只要取得components年的資料即可<br>    //    ，不需要Date其它如月、日、時、分、時區等資料<br>    // 再宣告一個常數，去存入Calendar的components的相關資料<br>    // 宣告變數year，以取得components年的資料，再存入變數中<br>    // 由於照片陣列的index是從0開始，而取出的年份之起始值為1，故要-=1<br>    // 將components的年帶入陣列中，再帶入畫面中(imageView)呈現出來</pre><pre>var sliderValue = 0<br>    <a href="http://twitter.com/IBAction">@IBAction</a> func changeSL(_ sender: UISlider) {<br>        sender.value.round()<br>        sliderValue = Int(sender.value)<br>        cutePetImageView.image = UIImage(named: yearImages[sliderValue])<br>    }<br>    // 將sliderValue設為0，以備使用<br>    // 將slider的值以四捨五入的方式呈現<br>    // 而後再將slider的值轉成整數，並存入sliderValue的變數中<br>    // 最後再將sliderValue帶入陣列中，並再帶入畫面中(imageView)呈現出來</pre><pre><a href="http://twitter.com/IBAction">@IBAction</a> func autoPlaySW(_ sender: UISwitch) {<br>        if sender.isOn {<br>            time()<br>            imageNumber = sliderValue<br>            yearSlider.value = Float(imageNumber)<br>        } else {<br>            timer?.invalidate()<br>        }<br>    }<br>    // switch，通常使用if else來做開關的判斷<br>    // 假如開關為開啟狀態<br>    // 就將time()給開啟<br>    // slider的值必需等同輸入到Assets中照片的數量，並將其轉成型別Float<br>    // 不然的話，就將計時器停掉(計時器失效)</pre><pre>override func viewDidLoad() {<br>        super.viewDidLoad()<br>        time()<br>        datePicker.locale = Locale(identifier: &quot;zh-TW&quot;)<br>        dateFormatter.dateFormat = &quot;yyyyMMdd&quot;<br>    }<br>}<br>    // viewDidLoad為最開始的啟動程式<br>    // 於viewDidLoad的大括號內寫入datePicker的當地時間與格式<br>    // 一開始進入模擬器時，即開啟時間time<br>    // zh為華語之意。將datePicker改為中文化格式<br>    // 將自定的yyyyMMdd格式帶入dateFormatter的dateFormat中</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstreamable.com%2Fo%2Ffjqork&amp;display_name=Streamable&amp;url=https%3A%2F%2Fstreamable.com%2Ffjqork&amp;image=https%3A%2F%2Fcdn-cf-east.streamable.com%2Fimage%2Ffjqork.jpg%3FExpires%3D1611198720%26Signature%3DANwd-lXOROyExCMjHkxWCpYaTBDFrQVgyafICHyAKov1HDTQQL0xoWKscF5HE6GCtWxnWvUBH6kWRxUGlWNnzi%7E3xceo9BPCPZ-%7ErXucyC-2VCOT2J18gIFZBdFlA9JTFYLCIcQGzxQOrA3LQTmlXDO3aEziphR7XhW0D8ydWK9h1sAuUvWbkIpTF2JhtadszF%7EprnCo5RcIUF9W8zTn3iNsoOQrwJASTAToHTm2Oy27l4yCzkwMLFO3PG0AEpV2Vh-qDnA56ukaAJnrS2OF5ZYw5VpKSIMNDxF0EvQFikzo14oQzn3a3-X7wXJkRRQ2pnER9-Z1xSdGu2FT3n96WA__%26Key-Pair-Id%3DAPKAIEYUVEN4EVB2OKEQ&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=streamable" width="330" height="718" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6a4f32b65c8db1064ec60957df7e08e/href">https://medium.com/media/b6a4f32b65c8db1064ec60957df7e08e/href</a></iframe><p><a href="https://github.com/Abnertw/Memories_2">Abnertw/Memories_2</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0806d61fd2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%8D%A8%E5%AE%B6%E8%A8%98%E6%86%B6-%E5%8D%81%E5%B9%B4-e0806d61fd2d">獨家記憶(十年)</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[說走就走 一起去環島-練習IBOutlet、IBAction與if else]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E8%AA%AA%E8%B5%B0%E5%B0%B1%E8%B5%B0-%E4%B8%80%E8%B5%B7%E5%8E%BB%E7%92%B0%E5%B3%B6-%E7%B7%B4%E7%BF%92iboutlet-ibaction%E8%88%87if-else-700d9f80b6da?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/700d9f80b6da</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Mon, 11 Jan 2021 03:05:27 GMT</pubDate>
            <atom:updated>2021-01-11T06:17:59.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*hCJvr9SAnnB9CIjBrBt5nw.png" /></figure><h3><strong>使用元件：</strong></h3><p><strong>textField, switch, slider, segmented control, button, label, imageView等</strong></p><p><strong>在storyboard中將所有元件編排好之後，</strong></p><ol><li><strong>在storyboard上設定要先隱藏的元件(如答案等)，在要設定的元件上找到Hidden後打勾。之後要顯示時再寫程式將其顯示即可。</strong></li></ol><p><strong>2. 在storyboard上設定slider的初始值、最小值與最大值。</strong></p><p><strong>接著，準備將元件連到程式碼中：(按右鍵或2指神功拖曳至程式碼中即可)</strong></p><p><strong><em>要將元件連結至程式的狀況分為2種(outlet與action)</em></strong></p><ol><li><strong><em>IBOutlet之元件有 - (一般來說無需另外寫程式，拉線即可，一般以名詞+元件名來命名，習慣拉線至IBAction的上方 — 屬性var)</em></strong></li></ol><p><strong>TextField, Switch, Slider, Segmented Control, Label, ImageView</strong></p><p><strong><em>2. IBAction之元件有-(需寫程式，可想為</em>使用者在操作該元件後，要在畫面上產生什麼樣的結果呈現給使用者。一般以動詞命名，<em>習慣拉線至IBOutlet的下方 — 方法function)</em></strong></p><p><strong>Slider(拉線時，要記得更改Type)</strong></p><p><strong>Button ×2 (報名鍵與重新選擇鍵)</strong></p><blockquote># Slider一般是拉<strong><em>IBAction，但若要讀取Slider的屬性value時，還是要再拉IBOutlet才是。(如:清除鍵，要將Slider歸零時)-(感謝潘帥)</em></strong></blockquote><p><strong>將所有的<em>IBOutlet及IBAction都連結至程式碼後，就剩下最後一步了。</em></strong></p><p><strong>寫程式(Slider與2個Button的func中) —</strong></p><h3><strong>以下為條件成立與不成立時的畫面與完整程式碼：</strong></h3><blockquote><strong>條件設計概念：</strong></blockquote><blockquote><strong>當有錢(switch isOn)，又有閒(segmented control)的Index == 0的時候，</strong></blockquote><blockquote><strong>條件才會成立(才可報名參加，一起去環島吧! )，否則(else)就下次再說吧!</strong></blockquote><h3><strong><em>條件成立時的畫面：</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*68KsInFlSTfrpTlE4VdNrQ.png" /></figure><h3>條件不成立時的畫面：</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*2VRjP7FaNuJvYbPsnRq6hA.png" /></figure><h3>完整程式碼如下：</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQpn5NY7eHCNWmmwvgN3uQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvvU67Uta_B0Kcxir_Iq3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zKwlptpqKosJ9eGFgqdyhw.png" /></figure><h3>最後放上面畫操作螢幕錄製與一起去環島影片</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstreamable.com%2Fo%2Fy2mb45&amp;display_name=Streamable&amp;url=https%3A%2F%2Fstreamable.com%2Fy2mb45&amp;image=https%3A%2F%2Fcdn-cf-east.streamable.com%2Fimage%2Fy2mb45.jpg%3FExpires%3D1610593380%26Signature%3DamnQyFrFYJEPOl2UdTF1g2UXwuMLhU5PQnU-CHpX7GMKqfMwhdBIF-FIinTsECw7f4-99CM-BFrwDB9SqnKwbZ1PfWrs26hVl7SP7FeoWDGlhv2jKm7Iws9H3w9w13BY0bLmJipCRZK1sHsh3W3ik70KyDOBTk58AFT52LPx6loudPo9a-QL-5SCuAhMEDjG7bvzDq8fjdW4ZbrrILZ9TZqX9v-1ZZoaV4ITrciB4oV6caPwBziuCBtk7lxpjfy3hTNmufBl44pwSb-C8Bdu4qHeVa8yZHtX4-vG8ROsr2C0QRhtJKqFvOgCIT3oQcu-APtfLfRSh6p%7EXZgccntE-g__%26Key-Pair-Id%3DAPKAIEYUVEN4EVB2OKEQ&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=streamable" width="330" height="718" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f6dfaa5db49484a9b66a62b4ed9be2f/href">https://medium.com/media/3f6dfaa5db49484a9b66a62b4ed9be2f/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrMHF7RKR4ag%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrMHF7RKR4ag&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrMHF7RKR4ag%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c658556d94de3f0221bd2d81bb925f4/href">https://medium.com/media/3c658556d94de3f0221bd2d81bb925f4/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=700d9f80b6da" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E8%AA%AA%E8%B5%B0%E5%B0%B1%E8%B5%B0-%E4%B8%80%E8%B5%B7%E5%8E%BB%E7%92%B0%E5%B3%B6-%E7%B7%B4%E7%BF%92iboutlet-ibaction%E8%88%87if-else-700d9f80b6da">說走就走 一起去環島-練習IBOutlet、IBAction與if else</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[學習定義Function(歌曲：勢在必行)]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AD%B8%E7%BF%92%E5%AE%9A%E7%BE%A9function-%E6%AD%8C%E6%9B%B2-%E5%8B%A2%E5%9C%A8%E5%BF%85%E8%A1%8C-2539a90ab71a?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2539a90ab71a</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 17:15:06 GMT</pubDate>
            <atom:updated>2020-11-24T07:38:26.501Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBhHdmugCPjo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBhHdmugCPjo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBhHdmugCPjo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/384a0c21870f1ab44a0080f27d9a4e98/href">https://medium.com/media/384a0c21870f1ab44a0080f27d9a4e98/href</a></iframe><h3>勢在必行</h3><p>詞曲：戴佩妮</p><p>歌詞原文 -</p><p>我以為我已經累了，無法再揮動沒有目標的翅膀</p><p>我試著飛越那扇窗，溫度卻讓身體再次感到很沮喪</p><p>我微笑不是假裝，我追是因為渴望 我奮不顧身奔向每一道陽光</p><p>我跌倒是種成長，我哭是一種釋放，我存在不是假象， 我不管， 我倔強</p><p>repeat</p><p>為愛付出瘋狂</p><p>為夢受一點傷</p><p>為保護我的信仰變得更堅強</p><p>為執著橫衝直撞</p><p>為你說了點謊</p><p>別說我一直找不到方向</p><p>(為別人看我不屑目光)</p><p>昂首飛翔</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ac960c4679d54e7e82393c56e73af7d/href">https://medium.com/media/0ac960c4679d54e7e82393c56e73af7d/href</a></iframe><p>改編版(帶入參數)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9eb9d9b8b6b18e4e66ea34023bfa2a66/href">https://medium.com/media/9eb9d9b8b6b18e4e66ea34023bfa2a66/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2539a90ab71a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AD%B8%E7%BF%92%E5%AE%9A%E7%BE%A9function-%E6%AD%8C%E6%9B%B2-%E5%8B%A2%E5%9C%A8%E5%BF%85%E8%A1%8C-2539a90ab71a">學習定義Function(歌曲：勢在必行)</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[寫給自己的第二人生]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%AB%E7%B5%A6%E8%87%AA%E5%B7%B1%E7%9A%84%E7%AC%AC%E4%BA%8C%E4%BA%BA%E7%94%9F-7db951b212fc?source=rss-6a7617f6685d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7db951b212fc</guid>
            <dc:creator><![CDATA[wyatt Peng]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 14:33:36 GMT</pubDate>
            <atom:updated>2020-11-24T08:01:45.993Z</atom:updated>
            <content:encoded><![CDATA[<p>向 新 人 生 啟 程</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Famv7CzCmHU0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Damv7CzCmHU0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Famv7CzCmHU0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/088046b6be686689765dede2b1a25329/href">https://medium.com/media/088046b6be686689765dede2b1a25329/href</a></iframe><p>2020年，人生中最巨烈轉變的一年</p><p>先前的自己，就像是苦澀的 即溶咖啡粉</p><p>或許是看不到未來與機會，所以一直不斷地找尋著</p><p>離開小小店面2年的我，不知怎麼了，就在今年</p><p>腦袋終於開始啟動了，一向喜歡學習新事物的我</p><p>在年初，先是接觸了美股投資(題外話) — (不要學，因為…哥哥…有練過)</p><p>(還有就是，投資有賺有賠……………………………………………………</p><p>……………………………………………………………請詳閱公開說明書)</p><p>在酷暑的7月時節，腦袋又再次轉動了起來</p><p>就像先前那樣，又有了新的想法</p><p>何不設計一個符合自己需求的旅遊App呢呢呢?…</p><p>(不停的在腦中迴盪著，就像for loop那樣)</p><p>不為別人，只是滿足自己的需求而已 (其實滿足別人也不錯)</p><p>一切的起因，起於14年六天五夜的環島計劃</p><p>足足花了我三個月的時間，才規劃完成</p><p>於是我又開始作夢了起來，彷彿預見了未來</p><p>夢想著，可以在虛擬的電腦世界裏，盡情地揮灑著我的無限可能</p><p>索性就衝動地報名了xx電腦(不好說)</p><p>上了第一堂課後，就到圖書館找尋了相關書籍</p><p>於是就與彼得潘有了第一次的親密接觸</p><p>十月一日的那天 // 週四、連假、毛毛雨、高雄、星巴克、1小時 //</p><p>然後 ~ 就 ~ 報名了文組生+彼得潘班</p><p>如果我是瑪爾濟斯</p><p>我就可以不用像人類常說的 比狗還累 (事實上，人比較累)</p><p>我是瑪爾嗎? 顯然不是，因為毛小孩不會打字</p><p>所以 就帶著夢想 飛進APP的世界吧!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80282b2cfbb204afdccb2813d75e7b07/href">https://medium.com/media/80282b2cfbb204afdccb2813d75e7b07/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8wQXyp7EftnYdCc_m0vcw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7db951b212fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%AB%E7%B5%A6%E8%87%AA%E5%B7%B1%E7%9A%84%E7%AC%AC%E4%BA%8C%E4%BA%BA%E7%94%9F-7db951b212fc">寫給自己的第二人生</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>