<?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 Sabrina Guo on Medium]]></title>
        <description><![CDATA[Stories by Sabrina Guo on Medium]]></description>
        <link>https://medium.com/@SabrinaGuo?source=rss-a94835cfbc20------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*De36UEjIefEiKPfkREhxoA.jpeg</url>
            <title>Stories by Sabrina Guo on Medium</title>
            <link>https://medium.com/@SabrinaGuo?source=rss-a94835cfbc20------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 14:36:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@SabrinaGuo/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[♯8.輕鬆使用 page control，segmented control，button & gesture 更換內容]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/8-%E8%BC%95%E9%AC%86%E4%BD%BF%E7%94%A8-page-control-segmented-control-button-gesture-%E6%9B%B4%E6%8F%9B%E5%85%A7%E5%AE%B9-b7b7f9f3f29c?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7b7f9f3f29c</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[segmentedcontrol]]></category>
            <category><![CDATA[page-control]]></category>
            <category><![CDATA[gesture-control]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 07 Aug 2022 06:30:07 GMT</pubDate>
            <atom:updated>2022-08-07T09:23:29.855Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*J4e6ihtOqngi_y7nEjRJrg.jpeg" /></figure><p>在各大網頁中很常看到這種類似輪播的控制項目，他可以運用最小空間來展示我們想要帶給使用者的內容，那就來實作看看吧！</p><p>先拉出我們想要的畫面：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*Edf9hBPTaMivJWSg5f7Ddw.jpeg" /></figure><p>首先需要內容陣列(含名稱、圖片)、各式變數：目前第幾張的變數(<em>nowIndex</em>)、segmented control(<em>segmentIdx</em>)、page control(<em>pagesIdx</em>)、imagesView(<em>imagesViewShow</em>)、名稱label(<em>radioNameLabel</em>)、目前第幾張的label(<em>countLabel</em>)。</p><pre>let radioNameArray:Array = [&quot;BTS-Butter&quot;,&quot;EricGraduation&quot;,&quot;GenHoshino-Comedy&quot;,&quot;NAYEON-POP&quot;,&quot;髭男-MixedNuts&quot;]</pre><pre>let radioPic:Array = [&quot;BTS.jpeg&quot;,&quot;Eric.jpeg&quot;,&quot;GenHoshino.jpeg&quot;,&quot;NAYEON.jpeg&quot;,&quot;OfficialHIGEDANdism.jpeg&quot;]</pre><pre>var nowIndex:Int = 0</pre><pre><a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var segmentIdx: UISegmentedControl!<br><a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var pagesIdx: UIPageControl!<br><a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var imagesViewShow: UIImageView!<br><a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var radioNameLabel: UILabel!<br><a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var countLabel: UILabel!</pre><p>再來需要三個函式，分別是切換下一張(<strong><em>func</em></strong><em> nextIdx (){}</em>)、切換上一張(<strong><em>func</em></strong><em> prevIdx (){}</em>)、依照切換張數來變更內容(<strong><em>func</em></strong><em> changeContent(idx:Int){}</em>)。</p><p><em>nextIdx ()、 prevIdx ()，顧名思義就是張數的遞增或是遞減。</em></p><p><em>changeContent(idx:Int)</em>這個函數改變圖片、名稱、label數字並同步改變page control，segmented control當前的數字，因此當我在進行切換時也需要呼叫這個函數並將當前數字傳入。</p><pre>func changeContent(idx:Int){<br>        nowIndex = idx<br>        <br>        imagesViewShow.image = UIImage(named: radioPic[nowIndex])<br>        radioNameLabel.text = radioNameArray[nowIndex]<br>        <br>        segmentIdx.selectedSegmentIndex = nowIndex<br>        pagesIdx.currentPage = nowIndex<br>        countLabel.text = &quot;\(nowIndex + 1) / (radioNameArray.count)&quot;<br>        <br>    }<br>    func prevIdx (){<br>        if nowIndex &gt; 0 {<br>            nowIndex -= 1<br>        }else {<br>            nowIndex = radioNameArray.count - 1<br>        }<br>        changeContent(idx:nowIndex)<br>    }<br>    func nextIdx (){<br>        if nowIndex &lt; radioNameArray.count - 1{<br>            nowIndex += 1<br>        }else{<br>            nowIndex = 0<br>        }<br>        changeContent(idx:nowIndex)<br>    }</pre><p>我覺得xcode厲害的是元件中其實都已經寫好可以運用的參數：</p><blockquote><a href="https://developer.apple.com/documentation/uikit/uipagecontrol/1621234-currentpage">UIPageControl 的 currentPage</a> ：目前選取的小圓點是第幾個。</blockquote><blockquote><a href="https://developer.apple.com/documentation/uikit/uisegmentedcontrol/1618575-selectedsegmentindex">UISegmentedControl 的 selectedSegmentIndex</a> ：目前選取的是第幾個 segment</blockquote><p>此外，/() 很常用於組合字串與變數之間的好物！</p><p>基本需要的內容與函數寫好之後，我們就要來控制page control，segmented control，button &amp; gesture囉！</p><p>page control：</p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func pagesChange(_ sender: UIPageControl) {<br>       <br>     changeContent(idx: sender.currentPage)<br>}</pre><p>segmented control：</p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func segmentChange(_ sender: UISegmentedControl) {<br>       <br>    changeContent(idx: sender.selectedSegmentIndex)<br>}</pre><p>button：</p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func prevChange(_ sender: Any) {<br>    prevIdx()<br>}<br>    <br>    <br><a href="http://twitter.com/IBAction">@IBAction</a> func nextChange(_ sender: Any) {<br>    nextIdx()<br>}</pre><p>gesture：如何新增手勢功能可以看<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%96%8B%E7%99%BC-ios-app-%E7%9A%84-gesture-%E6%89%8B%E5%8B%A2%E5%8A%9F%E8%83%BD-uikit-%E7%89%88%E6%9C%AC-f6cb95075705">這裡</a></p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func swipeChange(_ sender: UISwipeGestureRecognizer) {<br>    if sender.direction == .right{<br>       prevIdx()<br>            <br>    } else if sender.direction == .left{<br>       nextIdx()<br>    }<br>}</pre><p>完成圖如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*6KjszmnU_h0rG46ZF26bLQ.gif" /></figure><p>然後順便練習一下日期XD</p><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> dateLabel: UILabel! //放置日期的 label 變數</pre><pre>override func viewDidLoad() {<br>        super.viewDidLoad()<br>        <br>        //初始時先把圖片與名稱都先帶入<br>        imagesViewShow.image = UIImage(named: radioPic[nowIndex])<br>        radioNameLabel.text = radioNameArray[nowIndex]</pre><pre>        let time = Date()<br>        let date =  Calendar.current.dateComponents(in:TimeZone.current, from: time)</pre><pre>        let month = date.month!<br>        let day = date.day!<br>        <br>        dateLabel.text = &quot;今天是\(month)月\(day)號&quot;<br>}</pre><p>以上！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7b7f9f3f29c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/8-%E8%BC%95%E9%AC%86%E4%BD%BF%E7%94%A8-page-control-segmented-control-button-gesture-%E6%9B%B4%E6%8F%9B%E5%85%A7%E5%AE%B9-b7b7f9f3f29c">♯8.輕鬆使用 page control，segmented control，button &amp; gesture 更換內容</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[♯7. Playground 玩玩樂 — function 練習、addSubview]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/7-playground-%E7%8E%A9%E7%8E%A9%E6%A8%82-function-%E7%B7%B4%E7%BF%92-addsubview-c12e46558aab?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/c12e46558aab</guid>
            <category><![CDATA[addsubview]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 31 Jul 2022 05:16:31 GMT</pubDate>
            <atom:updated>2022-07-31T09:14:53.342Z</atom:updated>
            <content:encoded><![CDATA[<h3>♯7. Playground 玩玩樂 — function 練習、addSubview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ffPtMUmKvG7mlK89" /><figcaption>Photo by <a href="https://unsplash.com/@arturtumasjan?utm_source=medium&amp;utm_medium=referral">Artur Tumasjan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>定義 function，印出讓自己一秒落淚的情歌歌詞</blockquote><p>兒歌一向都很朗朗上口，來練習 function 真是再好不過了！</p><p>原始歌詞</p><p>Baby shark, doo doo doo doo doo doo. *3</p><p>Baby shark!</p><p>Mommy shark, doo doo doo doo doo doo. *3</p><p>Mommy shark!</p><p>Daddy shark, doo doo doo doo doo doo. *3</p><p>Daddy shark!</p><p>Grandma shark, doo doo doo doo doo doo. *3</p><p>Grandma shark!</p><p>Grandpa shark, doo doo doo doo doo doo. *3</p><p>Grandpa shark!</p><p>Let’s go hunt, doo doo doo doo doo doo. *3</p><p>Let’s go hunt!</p><p>Run away, doo doo doo doo doo doo. *3</p><p>Run away!</p><p>Safe at last, doo doo doo doo doo doo. *3</p><p>Safe at last!</p><p>It’s the end, doo doo doo doo doo doo. *3</p><p>It’s the end!</p><p>大家應該很輕易的可以看出要定義多少個 funtcion 吧！</p><pre>func doo(){<br>  print(&quot;doo doo doo doo doo doo.&quot;)<br>}<br>func shark(_ name:String = &quot;baby&quot;,_ char:String=&quot;,&quot;){<br>  print(name + &quot; shark&quot;+char)<br>}<br>func hunt(_ char:String=&quot;,&quot;){<br>  print(&quot;Let&#39;s go hunt&quot;+char)<br>}<br>func runAway(_ char:String=&quot;,&quot;){<br>    print(&quot;Run away&quot;+char)<br>}<br>func safeLast(_ char:String=&quot;,&quot;){<br>    print(&quot;Safe at last&quot;+char)<br>}<br>func end(_ char:String=&quot;,&quot;){<br>    print(&quot;It&#39;s the end&quot;+char)<br>}</pre><p>定義好之後就好辦事啦！</p><pre>shark(&quot;baby&quot;,&quot;,&quot;)<br>doo()<br>shark(&quot;baby&quot;,&quot;!&quot;)<br>shark(&quot;Mommy&quot;,&quot;,&quot;)<br>doo()<br>shark(&quot;Mommy&quot;,&quot;!&quot;)<br>shark(&quot;Daddy&quot;,&quot;,&quot;)<br>doo()<br>shark(&quot;Daddy&quot;,&quot;!&quot;)<br>shark(&quot;Grandma&quot;,&quot;,&quot;)<br>doo()<br>shark(&quot;Grandma&quot;,&quot;!&quot;)<br>shark(&quot;Grandpa&quot;,&quot;,&quot;)<br>doo()<br>shark(&quot;Grandpa&quot;,&quot;!&quot;)<br>hunt()<br>doo()<br>hunt()<br>doo()<br>hunt()<br>doo()<br>hunt(&quot;!&quot;)<br>runAway()<br>doo()<br>runAway()<br>doo()<br>runAway()<br>doo()<br>runAway(&quot;!&quot;)<br>safeLast()<br>doo()<br>safeLast()<br>doo()<br>safeLast()<br>doo()<br>safeLast(&quot;!&quot;)<br>end()<br>doo()<br>end()<br>doo()<br>end()<br>doo()<br>end(&quot;!&quot;)</pre><p>寫完之後，我現在腦海裡都是這個旋律了XD</p><blockquote>addSubview 練習</blockquote><p>view 的疊加其實也很常出現，剛好可以用 Playground 來練習一下，先來挑張喜歡的圖片，我選了棋Ｏ王，沒辦法佐為實在很好看！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*zsY1Uj36rX7RZoCPo6-9_g.jpeg" /></figure><p>看了看我決定要幫塔矢亮改髮色，首先可以用Mac 內建的預覽程式去背塔矢亮的頭髮，操作方式可參考<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%A6%82%E4%BD%95%E7%94%A8-previe-app-%E9%A0%90%E8%A6%BD%E7%A8%8B%E5%BC%8F-%E5%8E%BB%E8%83%8C%E5%9C%96%E7%89%87-f44640424ba2">這篇</a>，搞定之後就可以丟到 Playground 來寫程式換髮色！</p><p>程式碼如下：（請忽略我在練習的 wifi 圖片 XD）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJfZpZscUOVWm5-JJX68wQ.jpeg" /><figcaption>先定義圖片，再給圖片一個 view</figcaption></figure><blockquote>UIImageView繼承自 UIView，因此擁有 view 的屬性以及可以使用 view 的方法</blockquote><p>再來用 view 的方法 .backgroundColor 幫背景上色之後，因為塔矢亮的頭髮已經被去背是透明的，自然就可以吃到背景色，製造出染髮的效果囉！</p><p>如果純色背景已經滿足不了，可以幫他換上條紋髮色！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-mJ9Vzr62_3BK8iXHw_2Yg.jpeg" /></figure><p>這次我將定義圖片與 view 寫在同一行 bgImageView ，根據背景換髮色的經驗，我們是要將條紋髮色當作背後的元件，把塔矢亮放在上面，他的頭髮才會染上條紋！addSubview 要包住的，就是塔矢亮！</p><p>既然都有繼承view 的屬性自然也可以增加邊框：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_GGXqCqDwWThwxzOy1l0rA.jpeg" /></figure><p>鏘鏘～</p><p>順便帶一下常用的屬性：</p><p>.layer.backgroundColor: CGColor? －背景顏色</p><p>.layer.cornerRadius: CGFloat －圓角矩形角度</p><p>.layer.borderWidth: CGFloat －線條寬度</p><p>.layer.borderColor: CGColor? －線條顏色</p><p>各式屬性可以查閱：</p><p><a href="https://developer.apple.com/documentation/quartzcore/calayer">Apple Developer Documentation</a></p><blockquote>梯形公式計算function</blockquote><pre>//梯形面積公式<br>func 面積(上底:Double,下底:Double,高:Double) -&gt; Double{<br>    return ( 上底 + 下底 ) * 高 / 2<br>}<br>面積(上底:8.0,下底:14.0,高:6)</pre><p>我在寫的時候有點太順手，忘記加上 -&gt; 所以我就直接爆錯</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*olmdmPOwCsz5lC91ESTwGA.jpeg" /></figure><p>有錯誤就是成長的時刻，所以記錄一下。</p><p>Playground 就先玩到這裡囉！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c12e46558aab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/7-playground-%E7%8E%A9%E7%8E%A9%E6%A8%82-function-%E7%B7%B4%E7%BF%92-addsubview-c12e46558aab">♯7. Playground 玩玩樂 — function 練習、addSubview</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[♯6.只會唸中文？沒關係我來幫你唸！- AVSpeechSynthesizer運用]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%8F%AA%E6%9C%83%E5%94%B8%E4%B8%AD%E6%96%87-%E6%B2%92%E9%97%9C%E4%BF%82%E6%88%91%E4%BE%86%E5%B9%AB%E4%BD%A0%E5%94%B8-avspeechsynthesizer%E9%81%8B%E7%94%A8-4561d735facb?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/4561d735facb</guid>
            <category><![CDATA[speechutterance]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 24 Jul 2022 09:16:56 GMT</pubDate>
            <atom:updated>2022-07-31T05:30:06.513Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IcYygUvzfFk-uZSO" /><figcaption>Photo by <a href="https://unsplash.com/@bogomi?utm_source=medium&amp;utm_medium=referral">Bogomil Mihaylov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>終於進入到不只 UI 的世界了，不過該拉的畫面還是得先處理，但是對於畫面我實在沒有靈感，只好求助 google 大神了，看到一篇符合我心中對於這個 APP 的畫面，所以就參考<a href="https://dribbble.com/shots/16466945-Bingue-App/attachments/11228263?mode=media">大神的畫面</a>來繪製更簡易的版本。</p><p>完成圖如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*Jvc_JAF1REdDcNv_NxgMNg.jpeg" /><figcaption>大概只有87分像而已</figcaption></figure><p>終於畫完畫面就要開始寫程式了！心中莫名雀躍（？</p><p>這次想要練習的是 AVSpeechSynthesizer ，所以一開始的前置作業如下：</p><ol><li>import AVFoundation</li><li>設定<em>變數</em>來儲存 AVSpeechUtterance(string: )，也就是需要唸出來的文字</li><li><em>變數</em>.voice:AVSpeechSynthesisVoice? = AVSpeechSynthesisVoice(language:String)：則是決定唸出來的語系</li><li><em>變數</em>.rate:Float = 最小為0最大為1，預設是0.5：唸文字的語速設定</li><li><em>變數</em>.volume:Float = 最小為0最大為1，預設是1：唸文字的音量設定</li></ol><p>提供各語系的 String 連結</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2547749411619fd2ffba71b2435db3aa/href">https://medium.com/media/2547749411619fd2ffba71b2435db3aa/href</a></iframe><p>其他還有很多相關的設定可以參考下方連結：</p><p><a href="https://developer.apple.com/documentation/avfaudio/avspeechutterance">Apple Developer Documentation</a></p><p>寫程式之前先來構思一下我畫面的步驟：</p><ol><li>剛進入畫面時想要有個歡迎的句子</li><li>輸入文字後可以朗讀我打出的文字</li><li>點擊語系按鈕可以轉成語系的發音方式</li><li>如果沒有打字也會說出提示內容，讓使用者知道需要打入文字才會有反應</li></ol><p>需要完成上述的動作時，需要完成以下：</p><ol><li><em>剛進入畫面時想要有個歡迎的句子</em>：viewDidLoad() 專門在處理畫面剛 load完成的部分，可以將想在畫面剛 load 完成時的動作寫進這裡。</li><li><em>輸入文字後可以朗讀我打出的文字</em>：設定變數儲存 textField 的文字內容，放置 AVSpeechUtterance(string: textField的文字內容) ，變數設定需拉出<strong>@IBOutlet</strong>。</li><li><em>點擊語系按鈕可以轉成語系的發音方式</em>：撰寫判斷是點擊哪一顆按鈕來決定是哪種語系的function，需拉出<strong>@IBAction</strong></li><li><em>如果沒有打字也會說出提示內容，讓使用者知道需要打入文字才會有反應</em>：判斷是否 textField 為空字串，如果「是」就播放相對應的提示內容。</li></ol><p>附上相對應的程式碼：</p><blockquote><em>剛進入畫面時想要有個歡迎的句子</em>：viewDidLoad() 專門在處理畫面剛 load完成的部分，可以將想在畫面剛 load 完成時的動作寫進這裡。</blockquote><pre>override func viewDidLoad() {<br>        super.viewDidLoad()<br>        // Do any additional setup after loading the view.<br>        <br>        //app 開啟時自動說話 안녕하세요<br>        let speechUtterance = AVSpeechUtterance(string:&quot;안녕하세요&quot;)// 變數：文字設定<br>        speechUtterance.voice = AVSpeechSynthesisVoice(language:&quot;ko-KR&quot;)// AVSpeechSynthesisVoice 為語系設定<br>        let synthesizer = AVSpeechSynthesizer() // AVSpeechSynthesizer()  為生成合成語音並能夠監視或控制正在進行的語音的對象<br>        synthesizer.speak(speechUtterance) // 放入文字設定變數內容<br>      <br>    }</pre><blockquote><em>輸入文字後可以朗讀我打出的文字</em>：設定變數儲存 textField 的文字內容，放置 AVSpeechUtterance(string: textField的文字內容) ，變數設定需拉出<strong>@IBOutlet</strong>。</blockquote><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> speakWords: UITextField!</pre><pre>speakWords.text! //讀取內容</pre><p>為什麼要寫上驚嘆號，請參考此篇文章</p><p><a href="https://www.appcoda.com.tw/swift-optional-intro/">Swift的問號與驚嘆號：可有可無的 Optional</a></p><blockquote><em>點擊語系按鈕可以轉成語系的發音方式</em>：撰寫判斷是點擊哪一顆按鈕來決定是哪種語系的function，需拉出<strong>@IBAction</strong></blockquote><blockquote><em>如果沒有打字也會說出提示內容，讓使用者知道需要打入文字才會有反應</em>：判斷是否 textField 為空字串，如果「是」就播放相對應的提示內容。</blockquote><pre><a href="http://twitter.com/IBAction">@IBAction</a> func choseLanguages(_ sender: UIButton) {<br>        switch sender{<br>        case btnEnglish:<br>            language = &quot;en-IE&quot; //語系設定<br>            // 如果使用者沒有輸入任何文字時<br>            if(speakWords.text==&quot;&quot;){<br>                speak(&quot;please enter text&quot;)<br>            }<br>        case btnMandarin:<br>            language = &quot;zh-TW&quot;<br>            if(speakWords.text==&quot;&quot;){<br>                speak(&quot;請輸入文字&quot;)<br>            }<br>        case btnSpanish:<br>            language = &quot;es-ES&quot;<br>            if(speakWords.text==&quot;&quot;){<br>                speak(&quot;por favor ingrese texto&quot;)<br>            }<br>        case btnFrech:<br>            language = &quot;fr-FR&quot;<br>            if(speakWords.text==&quot;&quot;){<br>                speak(&quot;veuillez entrer du texte&quot;)<br>            }<br>        default: break<br>        }<br>        speak(speakWords.text!) //唸出來！<br>    }</pre><blockquote>如果 case 下不做任何事，需加上 break 表示會離開 switch 的 {}</blockquote><p>寫完就要來測試啦！不過因為此時的xCode beta14 沒有辦法用模擬器聽聲音，必須要安裝到自己的手機，安裝方式可以參考小潘同學的說明文章！</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%BE%9E-xcode-8-%E5%B0%87app%E5%AE%89%E8%A3%9D%E5%88%B0-iphone-%E7%9A%84%E5%B0%8F%E5%B0%8F2%E5%80%8B%E6%AD%A5%E9%A9%9F-39f7b81b69a6">從 Xcode 將 App 安裝到 iPhone</a></p><p>結果打完文字之後卻發現鍵盤怎麼沒有乖乖收起來，可惡我原本以為都會自動收起來的！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*0G9nDZDRhPJemsKWrVpPKg.png" /></figure><p>google 大神再次出動！</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/uitextfield-%E9%BB%9E%E9%81%B8-return-%E9%8D%B5%E6%94%B6%E9%8D%B5%E7%9B%A4%E7%9A%84%E6%96%B9%E6%B3%95-f99769370d46">第一篇</a>是參考小潘同時的點選 return 可以收鍵盤的方法1。</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/swift-keyboard-%E9%8D%B5%E7%9B%A4%E5%B0%8F%E4%BA%8B%E6%83%85-a4b2a16c87d1">第二篇</a>我則是參考點擊任何地方都可以將鍵盤收起來的方法，附上程式碼</p><pre>//當點擊view任何一處鍵盤收起<br>    override func touchesBegan(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?) {<br>    self.view.endEditing(true)<br>    }</pre><p>ＯＫ！可以展現我的成果啦～</p><p>ps: 如果你想按了按鈕收鍵盤的話～也可以拉一個 @IBAction</p><pre>view.endEditing(true)</pre><ul><li><a href="https://youtube.com/shorts/Kk28AzvKcB4?feature=share">一進入畫面時播放語音</a></li><li><a href="https://youtube.com/shorts/kqF3bluj5pU?feature=share">播放輸入文字語音</a></li><li><a href="https://youtube.com/shorts/_Kvu0fZZCqE?feature=share">未輸入時提醒語音</a></li></ul><p>結尾：程式路上，google 大神真是好幫手啊～</p><p>附上 git</p><p><a href="https://github.com/SabrinaGuo/Demo-AVFoundation/blob/main/Demo-AVFoundation/ViewController.swift">Demo-AVFoundation/ViewController.swift at main · SabrinaGuo/Demo-AVFoundation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4561d735facb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%8F%AA%E6%9C%83%E5%94%B8%E4%B8%AD%E6%96%87-%E6%B2%92%E9%97%9C%E4%BF%82%E6%88%91%E4%BE%86%E5%B9%AB%E4%BD%A0%E5%94%B8-avspeechsynthesizer%E9%81%8B%E7%94%A8-4561d735facb">♯6.只會唸中文？沒關係我來幫你唸！- AVSpeechSynthesizer運用</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[♯5. 寫寫電子書！Storyboard好朋友]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/3-1-%E5%AF%AB%E5%AF%AB%E9%9B%BB%E5%AD%90%E6%9B%B8-storyboard%E5%A5%BD%E6%9C%8B%E5%8F%8B-294a1537708a?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/294a1537708a</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[storyboard]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 17 Jul 2022 06:23:05 GMT</pubDate>
            <atom:updated>2022-07-21T03:22:42.845Z</atom:updated>
            <content:encoded><![CDATA[<p>不用程式也可以寫寫電子書？當然可以囉！！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hr3AYt7KlG1ftlXn" /><figcaption>Photo by <a href="https://unsplash.com/@srz?utm_source=medium&amp;utm_medium=referral">sydney Rae</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>步驟一開始，當然是得先確定你想寫什麼樣的主題，正好之前在寫小元件的介紹，那就乾脆做成一個小小電子書吧！</p><p><a href="https://medium.com/@SabrinaGuo/2-2-xcode%E7%9A%84%E5%B8%B8%E8%A6%8Bui%E5%B0%8F%E5%85%83%E4%BB%B6-f0f890efd7e9">♯2–2. Xcode的常見UI小元件</a></p><p>結合上述的元件之外，我也想運用navigation controller、tab bar controller、scroll view、table view controller、content view來製作這本電子書。</p><p>規劃內容如下：</p><p>使用<strong>tab bar controller</strong>做出三個分頁，分別是<em>UI介紹、好書推薦、最新消息。</em></p><p>運用<strong>navigation controller</strong>可使頁面有back的按鈕以及使用滑動可以回到上一頁的功能。</p><p><strong>table view controller</strong>則是運用在好書推薦，並使用垂直的<strong>scroll view</strong>來放置書本說明。</p><p>最新消息也運用了水平<strong>scroll view</strong>來放置新聞圖片，結合<strong>content view</strong>與<strong>table view controller</strong>來製作滾動的新聞列表。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHQKZpzWyo_7MRzR3weXDA.jpeg" /><figcaption>Xcode的畫面圖示</figcaption></figure><p>製作的過程中需注意：</p><ol><li>初始頁面的設定(initial view controller)</li><li>navigation controller可以設定標題讓使用者知道上一頁是哪裡</li><li>從tab bar controller連到 view controller 時選擇 view controllers</li><li>從 navigation controller 連到 view controller 時選擇 root view controller</li><li>scroll view 記得設定contentSize/size/value(注意事項5)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*8oktgGtrLZhK2d4zHSHljg.jpeg" /><figcaption>注意事項5</figcaption></figure><p>畫面gif如下：</p><p>ＵＩ介紹</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*ZcaWcDIH8vtZG3FTicX9ag.gif" /></figure><p>好書推薦gif如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*a5YHhyVxC8X1t0mHTxWbQg.gif" /></figure><p>最新消息gif如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*3Sw8PE-1u41K_Jw7sO5fjw.gif" /></figure><p>以上～謝謝收看！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=294a1537708a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/3-1-%E5%AF%AB%E5%AF%AB%E9%9B%BB%E5%AD%90%E6%9B%B8-storyboard%E5%A5%BD%E6%9C%8B%E5%8F%8B-294a1537708a">♯5. 寫寫電子書！Storyboard好朋友</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[♯4. Xcode的常見UI小元件]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/2-2-xcode%E7%9A%84%E5%B8%B8%E8%A6%8Bui%E5%B0%8F%E5%85%83%E4%BB%B6-f0f890efd7e9?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0f890efd7e9</guid>
            <category><![CDATA[uikit]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 17 Jul 2022 04:31:00 GMT</pubDate>
            <atom:updated>2022-07-21T03:22:28.920Z</atom:updated>
            <content:encoded><![CDATA[<p>在科技的持續進步之下，APP如雨後春筍一般的冒出頭來，看著看著，就會發現「誒！怎麼很多很常看到小元件」，沒錯！你真相了，所以現在就來稍微看一下常見的小元件吧！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0H2EYVMARTdJzwNm" /><figcaption>Photo by <a href="https://unsplash.com/@blakecheekk?utm_source=medium&amp;utm_medium=referral">Blake Cheek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong>Segmented Control </strong>對於分類的切割，一直都有很不錯的使用者體驗，可以將想提供給使用者的內容，做一些內容上的切割與分類後，讓使用者可以輕鬆找到自己想要知道的內容。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*9d0AcJjqHIS_4-1N82x00w.png" /></figure><blockquote><strong>Slide</strong> 很適合用於程度設定上的情境，你可以選擇使用圖片或是文字來說明程度的大小高低，但僅可選擇其中一種方式來說明。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*GfEAdDksfuQUsk1ZQdHMMA.png" /></figure><blockquote><strong>Switch</strong> 很常出現在僅有是與否的選項當中，使用體驗上也很好。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*xUSBAgpJjEjgE7odDwPV4g.png" /></figure><blockquote><strong>Page Control </strong>會在需要大量資料中，提供給使用者點擊換頁的功能。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*AJpnx0ipuBiFjJpfuSuNSg.png" /></figure><blockquote><strong>Progress View </strong>告知使用者目前進度如何，讓使用者可以在這過程中得知情況如何，提升使用者體驗。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*zfFh_jmkn5AVOFL9eNkbjQ.png" /></figure><blockquote><strong>Activity Indicator View </strong>常使用在頁面正在下載中。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*OD_ykIScWwyWC1uUYoxDhg.png" /></figure><blockquote><strong>Date Picker </strong>也是很使用的元件之一，有許多樣式提供選擇，可以依照設計來去做適當地調配。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*i_NII8HZF7MzdxL1dSr71g.png" /><figcaption>預設樣式(小巧版)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*ORtewO9DQWTfL5KlszN1ZQ.png" /><figcaption>預設樣式日期點擊</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*LLr_i_Ouk6ImUP5gRjbArA.png" /><figcaption>預設樣式時間點擊</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*U2RstVfNDCLrZTG8gzCGXA.png" /><figcaption>inline樣式</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*a3OJBwvmLWM4xZa7dU8UTQ.png" /><figcaption>滾輪樣式</figcaption></figure><blockquote><strong>Color Well </strong>調色盤提供使用者可以選擇。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*yA4vSqc0xGu2LQ624pIZwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*9HIYIFP_kZVGQ4qNP9cTzQ.png" /><figcaption>點擊展開調色盤</figcaption></figure><blockquote><strong>Visual Effect View with Blur </strong>毛玻璃樣式，可以調整模糊的濃淡程度以及明亮暗黑等系統設定模式。小細節設定如下：</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*hizdGuSuNiPQ7c6cZ0VDjQ.png" /></figure><p>以上是這次的小小說明！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0f890efd7e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/2-2-xcode%E7%9A%84%E5%B8%B8%E8%A6%8Bui%E5%B0%8F%E5%85%83%E4%BB%B6-f0f890efd7e9">♯4. Xcode的常見UI小元件</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[♯3. App Icon 設定]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/2-1-app-icon-%E8%A8%AD%E5%AE%9A-6b7abbf043a0?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b7abbf043a0</guid>
            <category><![CDATA[xcode-14]]></category>
            <category><![CDATA[app-icon]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 10 Jul 2022 06:45:31 GMT</pubDate>
            <atom:updated>2022-07-21T03:22:01.269Z</atom:updated>
            <content:encoded><![CDATA[<p>處理App Icon 大概是目前為止最簡單的部分了！擁有好 Icon 可以增加下載的動機，不過目前只需要先知道 App Icon 的基本要求即可。</p><ol><li>僅限 png 檔名</li><li>圖片尺寸僅限 1024 * 1024</li><li>無需裁切圖片的圓角矩形</li><li>Xcode 14 版本中可以直接放置一張符合規定的圖片後，Xcode 會直接幫你生成各種尺寸的 Icon 圖片</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4AM29F5HQOwNQIpR" /><figcaption>Photo by <a href="https://unsplash.com/@alexbemore?utm_source=medium&amp;utm_medium=referral">Alexander Shatov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>好的，稍稍說明一下步驟：</p><ol><li>繪製或搜尋適合的 icon 圖片</li><li>使用Preview或是繪圖軟體將圖片尺寸設定為 1024 * 1024</li><li>將圖片拖曳至 Xcode 專案 / Assest / AppIcon 虛線框中</li><li>大功告成，記得重新 Run 一下唷！</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_k-z5kQnmjqmBI0gg71Xw.jpeg" /><figcaption>模擬器與 Xcode 示意圖</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b7abbf043a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/2-1-app-icon-%E8%A8%AD%E5%AE%9A-6b7abbf043a0">♯3. App Icon 設定</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[♯2.使用Marvel App 製作 Prototype]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/1-2-%E4%BD%BF%E7%94%A8marvel-app-%E8%A3%BD%E4%BD%9C-prototype-a130164dbceb?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/a130164dbceb</guid>
            <category><![CDATA[prototype]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[marvel-app]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Sun, 10 Jul 2022 05:46:18 GMT</pubDate>
            <atom:updated>2022-07-21T03:21:36.535Z</atom:updated>
            <content:encoded><![CDATA[<p>無論在網頁或是APP的草創時期，會需要線框稿 (wireframe)與原型 (prototype)的大力協助。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7p-C59le3_RvyO3Z" /><figcaption>Photo by <a href="https://unsplash.com/@alvarordesign?utm_source=medium&amp;utm_medium=referral">Alvaro Reyes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>線框稿 (wireframe)</strong></h3><p>線框稿是一個低擬真度來呈現產品設計的模樣，它目的有以下三點:</p><ol><li>呈現主要的資訊</li><li>呈現資訊的排版與架構</li><li>方便描述使用者如何與產品互動</li></ol><h3><strong>原型 (prototype)</strong></h3><p>屬於中到高度擬真來模擬使用者與介面之間的互動，例如說按鈕按下後會出現的操作方式等，模擬一個產品完整的體驗。經過使用者測試使用後，設計師可將設計做精準的調整，而開發團隊不需要浪費其時間與精力。</p><p>解釋完上述名詞之後，就可以來試試使用Marvel App 製作 Prototype，Marvel App擁有非常友善的教學，對於初次使用的民眾(也就是我)也有提供文件配合影片來協助。</p><p><a href="https://help.marvelapp.com/hc/en-us/articles/360002536038">A guide to creating your first prototype</a></p><p>使用之前需要先註冊會員，就可以進入專屬你的儀表板，創建一個專案，你可以建立屬於此專案的名稱以及裝置，如果你有自己的設計稿可以自行將圖片拉入之後開始進行頁面的串接，也可以自己設計畫面內容後再行串接，之後只需要按下 play 就可以看到整個你設計後的流程囉！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r_YbkCHsV_L4Qh4Dp-i4Mg.jpeg" /><figcaption>儀表板中點擊創建專案</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9_BFxD9aw9PxpNJ_PEB7w.jpeg" /><figcaption>建立屬於此專案的名稱以及裝置</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u6C3-OgEp2-0siCDPREDhw.jpeg" /><figcaption>將自己設計好的畫面直接拖曳進入</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*91x2s8NpXSd6nL5I03E7PA.jpeg" /><figcaption>拖曳之後畫面</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArMb2lr6BDyetBptcWPWhg.jpeg" /><figcaption>點擊圖片之後出現 Prototype 按鈕，點擊後進入編輯畫面</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qe9h9ks5F80LmlJhmJy9EQ.jpeg" /><figcaption>拉出想要與使用者互動區域後，可在左下三區塊進行動作設定，完成後點擊 Close，可以點擊 Play 測試畫面互動是否符合需求，確認後可以點擊 Done</figcaption></figure><p>若想要新的設計也可以！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X58OIUBrAxVxKyDsN5lBpA.jpeg" /><figcaption>選擇 Design in Marvel，便會進到空白畫布中</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhVQs8t1czWY7j-ag2A2Ig.jpeg" /><figcaption>左方區塊可繪製適合的元件，右邊會隨著你選擇的元件出現相關的設定，設計完畢想設計下一個畫面可以點擊下方 Add design 就會出現一個新的畫布，設計完畢可以點擊 Close，之後重複上述設定 Prototype 的模式。</figcaption></figure><p>上述流程是我從影片上擷取下來的，大家也可以看看影片內容，自己動手玩玩看唷！</p><p>鏘鏘～實作如下：</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fmarvelapp.com%2Fprototype%2Fic32dfe%3Femb%3D1%26&amp;display_name=MarvelApp&amp;url=https%3A%2F%2Fmarvelapp.com%2Fprototype%2Fic32dfe%2Fscreen%2F87925600&amp;image=https%3A%2F%2Fmarvel-live.freetls.fastly.net%2Fserve%2F2022%2F7%2F050e461f1bcc4b51b6e77b8568ae4326.png%3Fquality%3D95%26fake%3D.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=marvelapp" width="452" height="925" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e27ebe376c93c05ee90559b3b6ae296/href">https://medium.com/media/8e27ebe376c93c05ee90559b3b6ae296/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a130164dbceb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/1-2-%E4%BD%BF%E7%94%A8marvel-app-%E8%A3%BD%E4%BD%9C-prototype-a130164dbceb">♯2.使用Marvel App 製作 Prototype</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[♯1. 錄製APP操作畫面與Git版本控制]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/1-%E9%8C%84%E8%A3%BDapp%E6%93%8D%E4%BD%9C%E7%95%AB%E9%9D%A2%E8%88%87git%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6-e5b19cb0f5bc?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5b19cb0f5bc</guid>
            <category><![CDATA[mock]]></category>
            <category><![CDATA[iphone-8]]></category>
            <category><![CDATA[gif]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Fri, 08 Jul 2022 16:19:10 GMT</pubDate>
            <atom:updated>2022-07-21T03:21:00.596Z</atom:updated>
            <content:encoded><![CDATA[<p>工欲善其事，必先利其器。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hLSOZPZVV-i5blTm" /><figcaption>Photo by <a href="https://unsplash.com/@vladdeep?utm_source=medium&amp;utm_medium=referral">Vlad Deep</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>做好一個 APP 卻乏人問津？其實也沒什麼好奇怪的，因為大家還不懂我們的 APP 多好用、多有趣、多活潑，但沒事也不會先下載一個莫名的APP，因此我們要如何可以快速吸眼球就是一個高深的學問，行銷又是另一個世界了，所以我們先跳過。</p><p>但我們可以先前置作業，先準備好我們 APP 的 GIF，讓還沒下載的人可以先行預覽我們的內容畫面，是否符合他的喜好，符合了就成功一半了！因此我們得先知道如何錄製。</p><p>感謝小潘同學當了我們巨人的肩膀，錄製相關的文章寫得很仔細，跟高級 buffet 一樣，可以挑選自己喜歡或是適合運用的方式，例如是否需要聲音錄製等等。</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/%E9%8C%84%E8%A3%BD%E5%88%86%E4%BA%AB%E7%B2%BE%E9%87%87%E7%9A%84ios-app%E6%93%8D%E4%BD%9C%E5%BD%B1%E7%89%87%E5%92%8Cgif-ffae55ffdbe1">錄製分享精采的 iOS App 操作影片</a></p><p>步驟也相當簡單，附上我的錄製成果圖：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*YylBHFWI4LdbmLrmDgMFtg.gif" /><figcaption>裝上框是錄製的四倍時間啊！！</figcaption></figure><p>接下來身為工程師就是要需要了解一下版控的重要性！</p><p>粗略粗略地說就是對你的程式碼進行所謂的備份動作，想想你沒日沒夜寫了一堆扣之後，終於可以打完收工，結果隔天發現自己電腦爆了，那些扣通通不見，心裡大概有幾百萬隻草泥馬會路過吧～版控就可以幫我們避免這件事情，以及團隊合作時大家共同開發，誰不小心把扣改爆了都可以找到兇手(茶)，想要更深了解其實也有滿多文章會聊到這個的！大家有興趣也可以去看看 ：）</p><p>如何將自己寫好的 iOS 上傳到版控上呢？</p><ol><li>申請自己的 Git 空間</li><li>與 Xcode 連動</li><li>撰寫commit</li><li>可能會有需要解衝突的時候</li><li>上傳！</li></ol><p>小潘同學也有完整的 Xcode 與自己的 Git 連動文章：</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%A6%82%E4%BD%95%E5%B0%87-ios-app-%E4%BD%9C%E6%A5%AD%E4%B8%8A%E5%82%B3%E5%88%B0-github-135416069dfd">如何將 iOS App 作業上傳到 GitHub</a></p><p>寫完作業我腦細胞已經陣亡，但簡略的陳述一下我如何將 GIF 檔 MOCK 到手機上好了，免得我之後也失憶。</p><ol><li>先找出想要 MOCK 的手機版本的PSD檔案，在 photoshop 中打開。(我手上的版本是 iphone 8 )</li><li>將錄製好的 GIF 在 photoshop 打開(與上述是不同頁面)，會出現時間軸的影格動畫，原則上按下播放就會自己跑起來。</li><li>將 MOCK 手機複製圖檔到 GIF 的文件中，寬高給拉一拉，假裝他們是同一個爸媽生的。</li><li>儲存方式：檔案→轉存→儲存為網頁用，再依照自己想要的大小進行儲存即可。</li></ol><p>好！打完收工。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5b19cb0f5bc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/1-%E9%8C%84%E8%A3%BDapp%E6%93%8D%E4%BD%9C%E7%95%AB%E9%9D%A2%E8%88%87git%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6-e5b19cb0f5bc">♯1. 錄製APP操作畫面與Git版本控制</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[♯0. 當忘記自己是誰時，就到這裡來 ♪]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/0-%E7%95%B6%E5%BF%98%E8%A8%98%E8%87%AA%E5%B7%B1%E6%98%AF%E8%AA%B0%E6%99%82-%E5%B0%B1%E5%88%B0%E9%80%99%E8%A3%A1%E4%BE%86-4d8927dc9f29?source=rss-a94835cfbc20------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d8927dc9f29</guid>
            <category><![CDATA[begin]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Sabrina Guo]]></dc:creator>
            <pubDate>Thu, 07 Jul 2022 06:32:47 GMT</pubDate>
            <atom:updated>2022-07-08T15:27:38.328Z</atom:updated>
            <content:encoded><![CDATA[<p>如果我是超人，我就能拯救世界。<br>我有超能力?沒有。<br>所以，很可惜，我只能當一般市井小民仰望天空等超人的那種。</p><p>如果我有小叮噹的百寶袋，我就能成為呼風喚雨的大人物。<br>我有裝時光機的抽屜？沒有。<br>所以，很遺憾，我只努力重複使用塑膠袋來愛護海龜。</p><p>如果我能持之以恆地一步一步督促自己，我就能成為這領域的Master。<br>我有準備好要前進? 有的。<br>所以，Hello World，我準備成為Master。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vRu1sHFQKD-3O4Xp" /><figcaption>Photo by <a href="https://unsplash.com/@dbmartin00?utm_source=medium&amp;utm_medium=referral">David Brooke Martin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hi，我是Sabrina，當再次點進這個文章的時候，可能正在思考自己在宇宙中渺小到看不見自己到底可以往哪裡前進，(也可能只是剛好自己太想耍廢，所以趕緊衝進來砥礪自己)不用擔心人生中難免會有想喘口氣的時候，不是什麼罪大惡極，喝個咖啡之後再坐回去吧！</p><p>如果發現二十分鐘過後還在看YouTube韓國女/男團的MV或是IG根本關不掉或是根本貪心到開了一堆跟iOS無相關的網頁時，想想可樂果(誤)，想想究竟為了什麼踏到iOS的世界、為什麼要當工程師吧。</p><p>⟣ 請記得當初轉換跑道的理由：想離開一個容易被取代的職業，唯有技術傍身，再將技術加深，才有機會讓自己有更高的價值。跨領域在現在的社會中真的是相對的幸運，把握著幸運配上努力，繼續前進。</p><p>⟣ 停下來時，世界依舊繼續運轉的真理：小小偷懶是小確幸，一直偷懶沒有人會等待你茁壯，(好像心靈雞湯的句子)。</p><p>⟣ 付出與努力將能讓自己珍惜的人過上更棒的日子：想想自己在乎的人吧！讓彼此都更好更好。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lWV2a8YJLU1Zwzkb" /><figcaption>Photo by <a href="https://unsplash.com/@priscilladupreez?utm_source=medium&amp;utm_medium=referral">Priscilla Du Preez</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>OK！再次出發吧！工程師的世界，GO！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d8927dc9f29" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/0-%E7%95%B6%E5%BF%98%E8%A8%98%E8%87%AA%E5%B7%B1%E6%98%AF%E8%AA%B0%E6%99%82-%E5%B0%B1%E5%88%B0%E9%80%99%E8%A3%A1%E4%BE%86-4d8927dc9f29">♯0. 當忘記自己是誰時，就到這裡來 ♪</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>