<?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 Daniel Hung on Medium]]></title>
        <description><![CDATA[Stories by Daniel Hung on Medium]]></description>
        <link>https://medium.com/@babipapi?source=rss-e3ac2bda3ae7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jtftHJyUYL5ts8Wf.jpg</url>
            <title>Stories by Daniel Hung on Medium</title>
            <link>https://medium.com/@babipapi?source=rss-e3ac2bda3ae7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 16:32:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@babipapi/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[訂飲料App part1]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E8%A8%82%E9%A3%B2%E6%96%99app-part1-db3a07aaff06?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/db3a07aaff06</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 16:16:44 GMT</pubDate>
            <atom:updated>2020-04-21T03:24:33.108Z</atom:updated>
            <content:encoded><![CDATA[<p>終於算是半完成這個訂飲料的App了，為什麼說是半完成呢，因為後續還想要在一些功能上去，像是刪除等等，另外或許可以再增加tab，讓內容可以更豐富一些。在寫這個作業的時候終於了解為什麼peter會出這道題目，其實有點像是總複習，把之前所上過所學過的東西都應用上去，想當然在寫的同時也去翻了很多之前上課的內容，除此之外也去參考了一些之前學長姐寫過的程式，不得不說真的是厲害，就對一個完全沒有程式背景的我能寫出來一個稍微有一點點像樣的東西，真的是很感動～當然也私下問了peter一些問題，至於畫面美感的部分就有待加強了，呵呵～</p><p>首先一開始我是先做一個tableViewController作為Menu用，把所有的資訊寫在一個Array裡面再用表格顯示出來，然後才回來做首頁的，讓首頁的Menu連結直接連過去，接下來就是訂飲料的主頁了，用了Segmented還有PickerView，以下是PickerView的寫法，讓使用者選了之後在TextField顯示</p><pre>//實作PickerView內容</pre><pre><strong>func</strong> numberOfComponents(in pickerView: UIPickerView) -&gt; Int {</pre><pre><strong>return</strong> 1</pre><pre>}</pre><pre><strong>func</strong> pickerView(<strong>_</strong> pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int {</pre><pre><strong>return</strong> drinkNameArray.count</pre><pre>}</pre><pre><strong>func</strong> pickerView(<strong>_</strong> pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String? {</pre><pre><strong>return</strong> drinkNameArray[row]</pre><pre>}</pre><pre>//要讓textfield顯示pickerview內容</pre><pre><strong>func</strong> pickerView(<strong>_</strong> pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {</pre><pre><strong>if</strong> row == 0{</pre><pre>drinkTextField.text = drinkNameArray[0]</pre><pre>}<strong>else</strong>{</pre><pre><strong>let</strong> selectrow = drinkNameArray[row]</pre><pre>drinkTextField.text = selectrow</pre><pre>}</pre><pre>}</pre><p>接下來都選完之後的重點就是要如何上傳到google sheet上面，在這邊是利用上課教的如何上傳到sheetDB</p><pre><strong>let</strong> url = URL(string: &quot;https://sheetdb.io/api/v1/***************&quot;)</pre><pre><strong>var</strong> urlRequset = URLRequest(url: url!)</pre><pre>urlRequset.httpMethod = &quot;POST&quot;</pre><pre>urlRequset.setValue(&quot;application/json&quot;, forHTTPHeaderField: &quot;Content-Type&quot;)</pre><pre><strong>let</strong> orderdrink = OrderDrink(name: userName, drinkname: drinkName, ice: ice, suger: suger, bubble: bubble, capacity:capacity)</pre><pre><strong>let</strong> orderdrinkData = OrderDrinkData(data: [orderdrink])</pre><pre><strong>let</strong> jsonEncoder = JSONEncoder()</pre><pre><strong>if</strong> <strong>let</strong> data = <strong>try</strong>? jsonEncoder.encode(orderdrinkData){</pre><pre>URLSession.shared.uploadTask(with: urlRequset, from: data) { (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{<br>...</pre><p>另外額外加了alertController在檢查姓名與訂購完成的時候顯示</p><p>接下來就是在下一個tab顯示出訂購人員的清單，這部分卡的比較久一點，原本一開始的程式都寫在viewDidLoad裡面，但發現點完飲料之後列表不會自己更新，一問之下才知道要寫在viewWillAppear，讓每次點到畫面的時候都會再跑一次程式，以便更新內容，在這頁就要寫從sheetDB下載的程式</p><pre><strong>override</strong> <strong>func</strong> viewWillAppear(<strong>_</strong> animated: Bool) {</pre><pre><strong>let</strong> urlAddress = &quot;https://sheetdb.io/api/v1/************&quot;</pre><pre><strong>if</strong> <strong>let</strong> url = URL(string: urlAddress){</pre><pre>URLSession.shared.dataTask(with: url) { (data, response, error) <strong>in</strong></pre><pre><strong>if</strong> <strong>let</strong> data = data, <strong>let</strong> drinkResults = <strong>try</strong>? JSONDecoder().decode([OrderDrink].<strong>self</strong>, from: data) {</pre><pre><strong>self</strong>.orderDrinkArray = drinkResults</pre><pre>}</pre><pre>DispatchQueue.main.async {</pre><pre><strong>self</strong>.tableView.reloadData()</pre><pre>}</pre><pre>}</pre><pre>}.resume()</pre><pre>}</pre><pre>}</pre><p>目前大致上就做到這邊，之後有時間再陸續修改囉~</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKsixufReu45yWWnfmao8g.gif" /></figure><p><a href="https://github.com/babipapi/demoOrderDrink">babipapi/demoOrderDrink</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db3a07aaff06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E8%A8%82%E9%A3%B2%E6%96%99app-part1-db3a07aaff06">訂飲料App part1</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[情歌對唱聊天室 cell 的 auto layout]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E6%83%85%E6%AD%8C%E5%B0%8D%E5%94%B1%E8%81%8A%E5%A4%A9%E5%AE%A4-cell-%E7%9A%84-auto-layout-6c827c82a65b?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c827c82a65b</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Tue, 31 Mar 2020 13:48:29 GMT</pubDate>
            <atom:updated>2020-03-31T13:48:29.769Z</atom:updated>
            <content:encoded><![CDATA[<p>上課時提到的男女對唱情歌，屋頂。我是參考peter的利用Auto Layout實現聊天泡泡這篇去研究要如何讓Cell呈現出Auto Layout，讓他去偵測文字裡面的多寡去呈現出他該有的樣子，另外在參考講義上要如何讓Cell去顯示他該有的東西，其實主要就是對內容的Array裡面你就要加入針對你想要顯示的判別，像我這邊的歌詞有男生有女生有合唱，那我就是要有一個參數是針對性別，裡面寫男生，女生還有合唱，然後再利用if else去判斷男生就顯示男生的內容，女生就顯示女生的內容</p><pre>Message(text: &quot;在屋頂和我愛的人&quot;, gender: &quot;boy&quot;),</pre><pre>Message(text: &quot;讓星星點綴成&quot;, gender: &quot;girl&quot;),</pre><pre>Message(text: &quot;最浪漫的夜晚 擁抱這時刻 這一分一秒全都停止&quot;, gender: &quot;together&quot;),</pre><p>另外要注意的就是像我這個練習，裡面有一個TableViewController，三個TableViewCell，到最後真的會有點眼花，在拉Assistant的時候要注意Controller的哪一個，要拉Outlet也是一樣，如果storyboard不好拉就直接從清單去拉比較快，因為我這個練習一開始只有一個Cell，後來想去試試看兩個Cell才去加的，到最後想說情歌對唱，一定有一個是合唱的，所以兩個Cell做好之後又再加一個Cell上去，所以有點混亂～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*2GCrEeZktiQMcteycaeNyg.gif" /></figure><p><a href="https://github.com/babipapi/demoChatAutoLayout">babipapi/demoChatAutoLayout</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c827c82a65b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E6%83%85%E6%AD%8C%E5%B0%8D%E5%94%B1%E8%81%8A%E5%A4%A9%E5%AE%A4-cell-%E7%9A%84-auto-layout-6c827c82a65b">情歌對唱聊天室 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[實作TableView基本功能]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%A6%E4%BD%9Ctableview%E5%9F%BA%E6%9C%AC%E5%8A%9F%E8%83%BD-c3498a616060?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3498a616060</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Tue, 31 Mar 2020 08:06:17 GMT</pubDate>
            <atom:updated>2020-03-31T11:07:21.011Z</atom:updated>
            <content:encoded><![CDATA[<p>這個作業主要還是在複習昨天peter上課的東西，再重新做一次增加自己的印象，另外把內容做豐富一點，看到之前有人做的咖啡介紹，想說咖啡是一個滿好發揮的內容，因次就開始以下的練習～</p><p>首先就先上網找尋相關資料與圖片，全部寫進一個swift file裡面，創造出一個coffeeArray出來，另外在TableViewController裡面的cell要記得去加id，並在</p><pre><strong>let</strong> cell = tableView.dequeueReusableCell(withIdentifier: <strong><em>“coffee”</em></strong>, for: indexPath)</pre><p>裡面去修改它，此時你可以把表格想要顯示的內容寫在裡面，之後在幫他轉型到TableViewCell，另外拉一個ViewController當作是要顯示詳細資料的畫面，再用IBSegueAction連過去，大致上就是這樣，我覺得要注意的是AutoLayout，要怎樣做才能符合每支手機，看來還有一大段路要走～繼續去試其他的東西了～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*p0kFhzkXZieyX1_8bOLZlg.gif" /></figure><p><a href="https://github.com/babipapi/demoCoffeeTableView">babipapi/demoCoffeeTableView</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3498a616060" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%A6%E4%BD%9Ctableview%E5%9F%BA%E6%9C%AC%E5%8A%9F%E8%83%BD-c3498a616060">實作TableView基本功能</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[利用IBSegueAction傳送資料到下一頁（心理測驗）]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%88%A9%E7%94%A8ibsegueaction%E5%82%B3%E9%80%81%E8%B3%87%E6%96%99%E5%88%B0%E4%B8%8B%E4%B8%80%E9%A0%81-%E5%BF%83%E7%90%86%E6%B8%AC%E9%A9%97-161529001db?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/161529001db</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Fri, 20 Mar 2020 16:27:32 GMT</pubDate>
            <atom:updated>2020-03-21T15:24:26.133Z</atom:updated>
            <content:encoded><![CDATA[<p>這次要練習的是要利用IBSegueAction將使用者在第一頁所選的資料傳送到下一頁，這部分雖然之前就聽過了，但是有聽沒有懂，直到這次聽完回家複習並練習這次的作業，終於對IBSegueAction有比較了解一點了，雖然花了半天的時間另外又問了peter好幾次，最後終於寫出來了，雖然這次寫的程式碼並沒有很多，不過心裡是有打算在之後有空的時候再來增加它的內容，那就之後再說了～</p><p>首先我的第一頁是利用兩個Button，然後依據使用者所選到的Button跳到下一個頁面，因為有兩個Button，所以我拉了兩個IBSegueAction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*miOT-Wmj0CKp1HaQPpZVbQ.png" /></figure><p>因為傳到第二頁是要傳一個String，所以在第二頁先產生一個變數型別為String，主要的是在IBSegueAction裡面的寫法，</p><pre><strong>@IBSegueAction</strong> <strong>func</strong> showAnswer1(<strong>_</strong> coder: NSCoder) -&gt; Answer1ViewController? {</pre><pre><strong>let</strong> controller = Answer1ViewController(coder: coder)</pre><pre>controller?.text = answer1.currentTitle</pre><pre><strong>return</strong> controller</pre><pre>}</pre><p>裡面的text就是第二頁的變數，answer1則是第一頁的第一個Button，然後再第二頁寫上if else去判斷text上的String是第一個Button上的String，還是第二個，現在回想起來其實不是很難，只是在當下真的會讓人有點繞不出來的感覺，解開來之後真的就舒服了許多～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*QE5it-uGy8SfRYZcmH7n0A.gif" /></figure><p>=======================================</p><p>PART2來了</p><p>有感於前一個練習內容實在是太少了，這次又多新增到六則心理測驗，使用的方法是在第二頁新增一個Button，按下去之後會回到第一頁，這個方法我使用的是unwind segue，這個之後peter會在上課中講到，因為之前聽過，所以就上網google作法，這部分還算簡單，前提是我已經將所有的題目，圖片，答案等相關的內容都寫在一個Array裡面，但問題來了，要怎樣順利的將點到的答案對應到對的內容呢，原本我是在第二頁中宣告變數i=0，然後想說利用i += 1的方式去寫，誰知道每次第一頁點選之後第二頁i都會從0開始跑，所以第二頁永遠都跑出一題的答案而已，之後還是受不了問了peter要怎麼解，結果還是得從IBSegueAction那邊動手，最後終於完成了，可以好好的睡一覺了～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*dMNRocXxBj1wlFoTprxv7A.gif" /></figure><p><a href="https://github.com/babipapi/demoInsideTest">babipapi/demoInsideTest</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=161529001db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%88%A9%E7%94%A8ibsegueaction%E5%82%B3%E9%80%81%E8%B3%87%E6%96%99%E5%88%B0%E4%B8%8B%E4%B8%80%E9%A0%81-%E5%BF%83%E7%90%86%E6%B8%AC%E9%A9%97-161529001db">利用IBSegueAction傳送資料到下一頁（心理測驗）</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]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E7%B4%99%E5%A8%83%E5%A8%83%E7%B7%B4%E7%BF%92app-ec7b0e046a0e?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec7b0e046a0e</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Thu, 19 Mar 2020 02:13:24 GMT</pubDate>
            <atom:updated>2020-03-19T02:44:30.067Z</atom:updated>
            <content:encoded><![CDATA[<p>一開始看到這個插畫家所分享的圖片真的是很有趣，利用身體，臉和五官就可以組合出上百種的人物插畫出來，當然裡面SegmentControl只有列取出幾個出來測試而已，另外做了一個Switch當作眼鏡的“開關”，最後做了一個Random的Switch來做隨機的圖案顯示～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*rl1ceRCQeTd7bnDkTz9aWA.gif" /></figure><p><a href="https://github.com/babipapi/changeFace">babipapi/changeFace</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec7b0e046a0e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%B4%99%E5%A8%83%E5%A8%83%E7%B7%B4%E7%BF%92app-ec7b0e046a0e">紙娃娃練習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[學習CIFilter讓照片有濾鏡的效果]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AD%B8%E7%BF%92cifilter%E8%AE%93%E7%85%A7%E7%89%87%E6%9C%89%E6%BF%BE%E9%8F%A1%E7%9A%84%E6%95%88%E6%9E%9C-9fc9d9ddd2bd?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fc9d9ddd2bd</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 15:19:36 GMT</pubDate>
            <atom:updated>2020-03-18T15:26:28.742Z</atom:updated>
            <content:encoded><![CDATA[<p>首先先說一下裡面的程式大部分都是peter寫出來的，我則是多了一個SegmentControl去選擇另外一個濾鏡的效果而已，我發現在CIFilter裡面有很多很多種效果，但因為都是英文的，所以也不知道產生的效果會是哪一種，最後我看到了一個ColorControl，很明顯的就是控制顏色，他的下面有一個property是brightness，剛好也是Float，可以搭配我們的Slider，所以就先拿這個做練習，當然還有很多很多其他的效果，這部分可能就要去參考別人的濾鏡是用哪一種func比較快了。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*0EiVm5_d7qEzjYZEpiYdAA.gif" /></figure><p><a href="https://github.com/babipapi/demoCIFliter">babipapi/demoCIFliter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fc9d9ddd2bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AD%B8%E7%BF%92cifilter%E8%AE%93%E7%85%A7%E7%89%87%E6%9C%89%E6%BF%BE%E9%8F%A1%E7%9A%84%E6%95%88%E6%9E%9C-9fc9d9ddd2bd">學習CIFilter讓照片有濾鏡的效果</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/%E9%AA%B0%E5%AD%90%E9%81%8A%E6%88%B2-ae7190c01ce?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae7190c01ce</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Sat, 04 Jan 2020 13:45:34 GMT</pubDate>
            <atom:updated>2020-01-04T13:45:34.094Z</atom:updated>
            <content:encoded><![CDATA[<p>先說這個App算是一個很基本練習用的App，用到的都是課堂上面有教過的東西，只是想說都做完了還是把它放在上面吧，另外我有加了一個很短很短的音效，還有我是用數字不是用骰子，不過都是大同小異～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*10J9HhlD8OpZQBqe-VU7Dw.gif" /></figure><p><a href="https://github.com/babipapi/demodices">babipapi/demodices</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae7190c01ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E9%AA%B0%E5%AD%90%E9%81%8A%E6%88%B2-ae7190c01ce">骰子遊戲</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%8C%9C%E6%8B%B3%E9%81%8A%E6%88%B2-b88e8645cb68?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b88e8645cb68</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Sat, 04 Jan 2020 13:35:59 GMT</pubDate>
            <atom:updated>2020-01-04T13:35:59.004Z</atom:updated>
            <content:encoded><![CDATA[<p>想了想還是先從比較簡單的開始寫，一開始腦袋裡面不知道畫面要怎樣規劃，最後還是用比較簡潔的方式，裡面的功能就是剪刀石頭布你選一個，然後電腦那邊就會用亂數去三個選一個出來，然後再利用if else去判斷誰贏誰輸，全部做完之後感覺應該要再補贏的次數在旁邊，這部分有時間再處理吧，先看看完成的畫面吧～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*S7jkM3o2QPtYa5qcCrQW7w.gif" /></figure><p><a href="https://github.com/babipapi/demopapperscissorstone">babipapi/demopapperscissorstone</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b88e8645cb68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%8C%9C%E6%8B%B3%E9%81%8A%E6%88%B2-b88e8645cb68">猜拳遊戲</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/%E9%81%B8%E6%93%87%E9%A1%8C-13e715dd78b5?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/13e715dd78b5</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Sat, 28 Dec 2019 09:45:56 GMT</pubDate>
            <atom:updated>2019-12-28T09:45:56.358Z</atom:updated>
            <content:encoded><![CDATA[<p>首先請原諒我的畫面並沒有做得很美觀，不過至少大致上的功能應該都做出來了，在程式中我出了20題的題目，利用亂數隨機取10題出來，一開始的問題就是該如何去判斷使用者選到的答案正確與否，想了幾天最後還是問了peter，結果他給了我提示，就是在敘述題目跟選項的時候要把答案一併打進去，然後在三個選項中去寫哪一個選項是跟正確的答案一樣，一樣就加10分，然後最多10題，10題結束之後就按重新開始重新出題，不過目前有發現一個bug就是到最後第10題的時後，選了一個選項之後你還是可以繼續按其他的選項，目前是無解～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*txqUud9yOZrxgDabGjkn9Q.gif" /></figure><p><a href="https://github.com/babipapi/demoChooseQuestion">babipapi/demoChooseQuestion</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13e715dd78b5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E9%81%B8%E6%93%87%E9%A1%8C-13e715dd78b5">選擇題</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/%E8%B7%9D%E9%9B%A2%E7%8F%BE%E5%9C%A8%E7%9A%84%E6%99%82%E9%96%93%E6%98%AF%E5%A4%9A%E4%B9%85-e6ac123d39da?source=rss-e3ac2bda3ae7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6ac123d39da</guid>
            <dc:creator><![CDATA[Daniel Hung]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 15:19:53 GMT</pubDate>
            <atom:updated>2019-12-20T15:24:18.571Z</atom:updated>
            <content:encoded><![CDATA[<p>首先要說的是畫面的部分我並沒有花很多的時間去設計，盡量把該有的功能呈現出來，首先就是一個datepicker，然後跟現在的時間去做比較，然後用的是peter提示的</p><pre>let interval = date1.timeIntervalSince(date2)</pre><p>這個得出來的是兩個時間相差的秒數，然後再利用這個去轉換成其他的單位~</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*mOja9ko-dfSCQlc6G90O1Q.gif" /></figure><p><a href="https://github.com/babipapi/demoTimeCountDown">babipapi/demoTimeCountDown</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6ac123d39da" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E8%B7%9D%E9%9B%A2%E7%8F%BE%E5%9C%A8%E7%9A%84%E6%99%82%E9%96%93%E6%98%AF%E5%A4%9A%E4%B9%85-e6ac123d39da">距離現在的時間是多久</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>