<?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 Julie Kuo on Medium]]></title>
        <description><![CDATA[Stories by Julie Kuo on Medium]]></description>
        <link>https://medium.com/@julie.kuo21?source=rss-d4329b30d2c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*rxEPO4MY-H4QG0conXGInQ.jpeg</url>
            <title>Stories by Julie Kuo on Medium</title>
            <link>https://medium.com/@julie.kuo21?source=rss-d4329b30d2c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 02:44:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@julie.kuo21/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[[Xcode HW] #105 使用 Open Peeps 圖庫開發紙娃娃 App]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/xcode-hw-105-%E4%BD%BF%E7%94%A8-open-peeps-%E5%9C%96%E5%BA%AB%E9%96%8B%E7%99%BC%E7%B4%99%E5%A8%83%E5%A8%83-app-9bd7f82c69fc?source=rss-d4329b30d2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bd7f82c69fc</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[彼得潘ios作業]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Julie Kuo]]></dc:creator>
            <pubDate>Thu, 26 Mar 2020 10:07:30 GMT</pubDate>
            <atom:updated>2020-03-27T04:33:15.958Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*y52nrm4P_AwhjAA0Xr0SAg.png" /></figure><blockquote>作業目的：從程式搭配 sketch &amp; zeplin，學習 @IBAction、@IBOutlet<br>練習對象： Avataaars by Pablo Stanley🧑🧑🏻🧑🏼🧑🏽🧑🏾🧑🏿</blockquote><p>作業要求的是Open Peeps 圖庫，但找到Open Peeps的畫家Pablo Stanley在更早期還有做一系列人物大頭照Avataaars圖庫，風格相對活潑可愛，所以就決定改以這系列作為練習對象，來做一個屬於自己的大頭照！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*neR7Ftuu3Wl4v6sfR7L2ow.gif" /></figure><p><strong>[關於Sketch]<br></strong>我們可以透過Sketch調整圖檔顏色和大小位置等等，因為利用Sketch處理圖檔，所以下載圖檔時要選擇.sketch，基本的sketch使用教學彼得潘跟網路上都有分享。<br>特別一提的是，如果點選Sketch右上角或者圖中的Export/Export Current Selection後沒有匯出所需的圖檔，必須針對遺漏的圖檔(或是乾脆全選圖檔)在Layer&gt;Make Exportable設定，再做一次Export就可以成功匯出png了。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*yv7wg1IUhjywRYawVaAzUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*VX1IXHAPDoLfjRTpoM0KMA.png" /></figure><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/%E6%90%AD%E9%85%8D-sketch-zeplin-%E8%A3%BD%E4%BD%9C-ios-%E7%9A%84%E5%81%A5%E5%BA%B7-app-%E7%95%AB%E9%9D%A2-b6f077b5a023">搭配 sketch &amp; zeplin 製作 iOS 的健康 App 和 App Store 畫面</a></p><p>接下來先安排人頭圖層順序，順序越後面的圖層會覆蓋前面的圖層，eg.嘴巴圖層要放到膚色之後。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ucH3EHis9gL5ltU6kC7Zvw.png" /></figure><p>先從最簡單的開始，以改變膚色為例，先將膚色的圖層拉右鍵到Assistant裡面，建立@IBOutlet。<br>其他部位的圖層也可以在這裡先設定好@IBOutlet。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bY8jAHWVrLqL2bkUDyssug.png" /></figure><p>在大頭照右邊建立一排各種膚色的按鈕，直接將button的image設定成各種膚色的圖檔。這次右鍵改拉到@IBAction，因為各種膚色將套用到前一個步驟所設定的skin圖層中，位置固定，所以所有的button可以直接右鍵拉到同一個@IBAction共用。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4VQxO5UimZ4AbP_6m6nNvQ.png" /></figure><p>撰寫程式碼，讓UIButton在被按下之後，會將UIButton身上的圖層(image)回傳給@IBOutlet skin的image。這樣就可以跑模擬器驗證了！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*CBxsnTOu8Z0Rofg6nmrvKg.gif" /></figure><p>再來挑戰難一點的：因為希望可以控制改變的大頭照部位有10個，每個部位至少5個樣式，不可能全部擠在畫面中；加上又很貪心的想要全部一目瞭然，所以沒有採用<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/xcode-hw-24-storyboard-%E9%9B%BB%E5%AD%90%E6%9B%B8-app-39d5174aed91">[Xcode HW] #24 Storyboard 電子書 App</a>所運用的Scroll view或Table view controller 。這次改用了Segmented Control+View做呈現。</p><p><strong>[View]</strong></p><ol><li>先做出10個部位的View，參照skin button的做法，把每個部位的樣式用UIButton建立在View裡面。可以先將View拉到Exit比較好調整，完成後再把所有的View重疊並調整座標，重疊是因為隨著Segmented Control的變動，希望一次只會顯示一個View。</li><li>10個部位的View各自拉出@IBOutlet，因為他們即將隨著Segmented Control的@IBAction連動。</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*asX2fF3c_KBXnl9C7UTUAw.png" /></figure><p><strong>[Segmented Control]</strong></p><ol><li>畫出Segmented Control，設定Segments、Segment和title</li><li>拉出@IBAction</li><li>撰寫程式碼，控制每個Segment的數值在被選取之後，10個View要顯示與否。Segment Index從0開始計算，所以case也要從0開始</li><li>依此類推寫滿10個View，2個Segmented Control</li></ol><p>不知道isHidden=true有沒有更簡便的方式可以一次關閉不需要的，不然程式碼也是落落長…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-7zVo2O8P-YaEZdzZ32zQ.png" /></figure><p>完成後一樣可以跑模擬器驗證！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*z3z-R95ju2hRv9WosgRPlA.gif" /></figure><p>題外，原本是用Segmented Control+Container View，然後將Container View各自embed一個額外的view controller，但是這樣就變成button資訊要在兩個storyboard間傳遞，在這邊卡關了好久，結果就跟圖中的大頭照一樣GG。<br>彼得說這個技巧我太菜還不會，用簡單一點的方式Segmented Control+View就好了！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sxd3pmLL4eg5G7OqbOo-JQ.png" /></figure><p>最期待的部分來了！讓10個View裡面的button產生@IBAction，邏輯與最一開始的skin一樣。由於最開始已經設定所有部位圖層的@IBOutlet，所以這邊直接可以寫程式碼，大功告成！！！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G6uDxp162bdWlFRuxAcB_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*muyXoCOkf4yUpLcy7iDgJg.png" /></figure><p>後話，大頭照圖庫其實沒有現在最流行的口罩圖案，因為畫家好像沒有在更新這個圖庫了。<br>但是，有了Sketch神器，我就自己在網路上免費圖庫抓了看起來很適用的口罩做修改，讓我們在家做App也可以一起防疫！</p><ul><li><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/105-%E4%BD%BF%E7%94%A8-open-peeps-%E5%9C%96%E5%BA%AB%E9%96%8B%E7%99%BC%E7%B4%99%E5%A8%83%E5%A8%83-app-f2af2ce87f5c">#105 使用 Open Peeps 圖庫開發紙娃娃 App</a></li><li><a href="https://avataaars.com/?ref=lapaninja">Avataaars - Avatar Illustrations Sketch Library</a></li><li><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/%E4%BD%BF%E7%94%A8-open-peeps-%E5%9C%96%E5%BA%AB%E9%96%8B%E7%99%BC%E7%B4%99%E5%A8%83%E5%A8%83-app-5ffec8176f95">使用 Open Peeps 圖庫開發紙娃娃 App</a></li></ul><h4>[Github] 完整程式碼</h4><p><a href="https://github.com/TricK0rTreAt/-105-Avataaars">TricK0rTreAt/-105-Avataaars</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bd7f82c69fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/xcode-hw-105-%E4%BD%BF%E7%94%A8-open-peeps-%E5%9C%96%E5%BA%AB%E9%96%8B%E7%99%BC%E7%B4%99%E5%A8%83%E5%A8%83-app-9bd7f82c69fc">[Xcode HW] #105 使用 Open Peeps 圖庫開發紙娃娃 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[[Xcode HW]＃43從程式製作國旗圖案]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/xcode-hw-43-%E5%BE%9E%E7%A8%8B%E5%BC%8F%E8%A3%BD%E4%BD%9C%E5%9C%8B%E6%97%97%E5%9C%96%E6%A1%88-e2cff0fc869?source=rss-d4329b30d2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2cff0fc869</guid>
            <category><![CDATA[彼得潘ios作業]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Julie Kuo]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 17:30:51 GMT</pubDate>
            <atom:updated>2020-03-30T07:05:19.593Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RJ9Cn2V0BniR4hOjh6Ismw.jpeg" /><figcaption>Cook庫克島艾圖塔基，2015.1.1</figcaption></figure><blockquote>作業目的：從程式製作畫面，學習addSubview和UIBezierPath <br>練習對象：絕美祕境<em>－</em>庫克群島庫克群島🏝</blockquote><p>這次的作業是要用Xcode畫國旗，我秒選了2015年跨年時曾造訪過的天堂〜庫克群島！<br>搜尋了庫克群島的國旗後才發現X ...選錯國家了...因為他曾經是英屬地加上總共由15個小島組成，所以國旗裡包含了兩個部分，英國國旗＋15顆環繞星星，早知道選日本國旗😂</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*g8d8cGkJFmHDH8gvVdK7dw.png" /><figcaption>來自Google的來源</figcaption></figure><p>材料：<br>1.取得圖檔寬500高333 <br>2.利用MAC內建的數位測色針取得RGB <br>3.利用<a href="https://yangcha.github.io/iview/iview.html">yangcha.github.io</a>取得各點座標<br>4。利用<a href="https://www.geogebra.org/graphing">geogebra.org/graphing獲得</a>座標和距離<br>5。最重要的彼得潘</p><h4>[第一部分]藍色底＋紅色/白色機箱區塊鏈</h4><p>先遣藍底</p><pre><strong>var</strong> rect = CGRect（x：0，y：0，寬度：500，高度：333）</pre><pre><strong>讓</strong> backgroundView = UIView（frame：rect）</pre><pre>backgroundView.backgroundColor = UIColor(red: 2/255, green: 21/255, blue: 86/255, alpha: 1)</pre><p>再畫十字區域(兩兩長方形重疊)。先蓋白色再蓋紅色</p><pre>//白橫</pre><pre>rect = CGRect(x: 0, y: 56, width: 250, height: 111-56)</pre><pre><strong>let</strong> whiterectView1 = UIView(frame: rect)</pre><pre>whiterectView1.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)</pre><pre>//白直</pre><pre>rect = CGRect(x: 97, y: 0, width: 153-97, height: 167)</pre><pre><strong>let</strong> whiterectView2 = UIView(frame: rect)</pre><pre>whiterectView2.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)</pre><pre>//紅直</pre><pre>rect = CGRect(x: 108, y: 0, width: 142-108, height: 167)</pre><pre><strong>let</strong> redrectView2 = UIView(frame: rect)</pre><pre>redrectView2.backgroundColor = UIColor(red: 186/255, green: 38/255, blue: 35/255, alpha: 1)</pre><pre>//紅橫</pre><pre>rect = CGRect(x: 0, y: 67, width: 250, height: 101-67)</pre><pre><strong>let</strong> redrectView1 = UIView(frame: rect)</pre><pre>redrectView1.backgroundColor = UIColor(red: 186/255, green: 38/255, blue: 35/255, alpha: 1)</pre><pre>backgroundView.addSubview(whiterectView2)</pre><pre>backgroundView.addSubview(whiterectView1)</pre><pre>backgroundView.addSubview(redrectView1)</pre><pre>backgroundView.addSubview(redrectView2)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*sj3FfbawfjtMGq-_nBLPbA.png" /></figure><h4>[第二部分]白色四個角落區塊</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ptvVlz6vYNjXkwAc2uKSog.png" /></figure><p>因為四角是對稱的，所以採用function作法。</p><p>先用UIBezierPath()畫出左上角的形狀，用func呼叫後，再各自鏡像翻轉跟移動位置。</p><pre><strong>let</strong> frame = CGRect(x: 0, y: 0, width: 100, height: 100)</pre><pre><strong>func</strong> cornerWhiteView() -&gt; UIView {</pre><pre><strong>let</strong> whiteView = UIView(frame: frame)</pre><pre>whiteView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)</pre><pre><strong>let</strong> whiteViewPath = UIBezierPath()</pre><pre><strong>var</strong></pre><pre>point = CGPoint(x: 0, y: 20)</pre><pre>whiteViewPath.move(to: point)</pre><pre>point = CGPoint(x: 54, y: 56)</pre><pre>whiteViewPath.addLine(to: point)</pre><pre>point = CGPoint(x: 97, y: 56)</pre><pre>whiteViewPath.addLine(to: point)</pre><pre>point = CGPoint(x: 97, y: 45)</pre><pre>whiteViewPath.addLine(to: point)</pre><pre>point = CGPoint(x: 30, y: 0)</pre><pre>whiteViewPath.addLine(to: point)</pre><pre>point = CGPoint(x: 0, y: 0)</pre><pre>whiteViewPath.addLine(to: point)</pre><pre>whiteViewPath.close()</pre><pre><strong>let</strong> whiteLayer = CAShapeLayer()</pre><pre>whiteLayer.path = whiteViewPath.cgPath</pre><pre>whiteView.layer.mask = whiteLayer</pre><pre><strong>return</strong> whiteView</pre><pre>}</pre><pre><strong>let</strong> view1 = cornerWhiteView()</pre><pre>backgroundView.addSubview(view1)</pre><pre><strong>let</strong> view2 = cornerWhiteView()</pre><pre>view2.transform = CGAffineTransform.identity.translatedBy(x: 150, y: 0).scaledBy(x: -1, y: 1)</pre><pre>backgroundView.addSubview(view2)</pre><pre><strong>let</strong> view3 = cornerWhiteView()</pre><pre>view3.transform = CGAffineTransform.identity.translatedBy(x: 0, y: 67).scaledBy(x: 1, y: -1)</pre><pre>backgroundView.addSubview(view3)</pre><pre><strong>let</strong> view4 = cornerWhiteView()</pre><pre>view4.transform = CGAffineTransform.identity.translatedBy(x: 150, y: 67).scaledBy(x: -1, y: -1)</pre><pre>backgroundView.addSubview(view4)</pre><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/83-%E5%88%A9%E7%94%A8-cgaffinetransform-%E7%B8%AE%E6%94%BE-%E4%BD%8D%E7%A7%BB%E5%92%8C%E6%97%8B%E8%BD%89-e061df9ed672">利用 CGAffineTransform 縮放，位移，旋轉和鏡像翻轉</a></p><h4>[第三部分]紅色四個角落區塊</h4><p>本來很天真以為可以仿照第二部分，複製四個紅色，定眼一看才發現只有左上跟右下的紅色對稱，右上是跟左下對稱，所以要UIBezierPath()畫兩張圖並且各自呼叫兩次。這邊只貼左上跟右下的code：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*BwgbElydD1FbgG7rHO8UnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ekcW8QJ_hp7egSb__2iJCw.png" /></figure><pre><strong>func</strong> cornerRedView() -&gt; UIView {</pre><pre><strong>let</strong> redView = UIView(frame: frame)</pre><pre>redView.backgroundColor = UIColor(red: 186/255, green: 38/255, blue: 35/255, alpha: 1)</pre><pre><strong>let</strong> redViewPath = UIBezierPath()</pre><pre><strong>var</strong></pre><pre>point = CGPoint(x: 0, y: 14)</pre><pre>redViewPath.move(to: point)</pre><pre>point = CGPoint(x: 64, y: 56)</pre><pre>redViewPath.addLine(to: point)</pre><pre>point = CGPoint(x: 84, y: 56)</pre><pre>redViewPath.addLine(to: point)</pre><pre>point = CGPoint(x: 0, y: 0)</pre><pre>redViewPath.addLine(to: point)</pre><pre>redViewPath.close()</pre><pre><strong>let</strong> redLayer = CAShapeLayer()</pre><pre>redLayer.path = redViewPath.cgPath</pre><pre>redView.layer.mask = redLayer</pre><pre><strong>return</strong> redView</pre><pre>}</pre><pre><strong>let</strong> view5 = cornerRedView()</pre><pre>backgroundView.addSubview(view5)</pre><pre><strong>let</strong> view6 = cornerRedView()</pre><pre>view6.transform = CGAffineTransform.identity.translatedBy(x: 150, y: 67).scaledBy(x: -1, y: -1)</pre><pre>backgroundView.addSubview(view6)</pre><h4>[第四部分]15顆環星</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*2F2D8v4LSuMS8rQSkZySvw.png" /><figcaption>用<a href="https://www.geogebra.org/graphing">geogebra.org/graphing</a>取得星星的座標&amp;距離</figcaption></figure><p>因為星星環繞成一個圓形，所以要利用到旋轉技巧，360度/15顆星星=每顆星星旋轉24度 。然後一樣用function，先畫出一顆星星，呼叫後再各自透過CGAffineTransform旋轉14次。</p><p>屁拉怎麼可能！我呼叫第二次後想說這樣要呼叫到甚麼時候啊而且旋轉到頭都暈了！所以決定改採for迴圈，一勞永逸！</p><pre><strong>let</strong> frame3 = CGRect(x: 272, y: 65, width: 207, height: 207)</pre><pre><strong>let</strong> oneDegree = CGFloat.pi / 180</pre><pre><strong>for</strong> i <strong>in</strong> 1...15 {</pre><pre><strong>let</strong> starView = UIView(frame: frame3)</pre><pre>starView.backgroundColor=UIColor(red: 1, green: 1, blue: 1, alpha: 1)</pre><pre><strong>let</strong> starPath = UIBezierPath()</pre><pre>starPath.move(to:CGPoint(x: 375-272, y: 65-65))        //1</pre><pre>starPath.addLine(to: CGPoint(x: 379-272, y: 77-65))    //2</pre><pre>starPath.addLine(to: CGPoint(x: 393-272, y: 77-65))    //3</pre><pre>starPath.addLine(to: CGPoint(x: 382-272, y: 85-65))    //4</pre><pre>starPath.addLine(to: CGPoint(x: 386-272, y: 98-65))    //5</pre><pre>starPath.addLine(to: CGPoint(x: 375-272, y: 90-65))    //6</pre><pre>starPath.addLine(to: CGPoint(x: 365-272, y: 97-65))    //7</pre><pre>starPath.addLine(to: CGPoint(x: 368-272, y: 85-65))    //8</pre><pre>starPath.addLine(to: CGPoint(x: 358-272, y: 78-65))    //9</pre><pre>starPath.addLine(to: CGPoint(x: 371-272, y: 77-65))    //10</pre><pre>starPath.close()</pre><pre><strong>let</strong> starPathLayer = CAShapeLayer()</pre><pre>starPathLayer.path = starPath.cgPath</pre><pre>starView.layer.mask = starPathLayer</pre><pre>starView.transform = CGAffineTransform.identity.rotated（作者：oneDegree * 24 * CGFloat（i））</pre><pre>backgroundView.addSubview（starView）</pre><pre>}</pre><pre>backgroundView</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*HjiYXF30mECO8EpMdwIDpQ.png" /><figcaption>由Xcode繪製</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*qMvvqvyYsWZQ0FQyPXvjWA.jpeg" /><figcaption>Cook庫克島艾圖塔基，2015.1.1</figcaption></figure><p>噹啷〜終於畫完國旗，最後拿尺比對一下，雖不中亦不遠矣😂恭喜<br>獲得在庫克群島潛水完曬傷的小黑人一枚👏👏</p><h4>[Github]完整程式碼</h4><p><a href="https://github.com/TricK0rTreAt/-43-Flag-of-the-Cook-Islands">TricK0rTreAt/-43-Flag-of-the-Cook-Islands</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2cff0fc869" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/xcode-hw-43-%E5%BE%9E%E7%A8%8B%E5%BC%8F%E8%A3%BD%E4%BD%9C%E5%9C%8B%E6%97%97%E5%9C%96%E6%A1%88-e2cff0fc869">[Xcode HW]＃43從程式製作國旗圖案</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[[Xcode HW] #24 Storyboard 電子書 App]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/xcode-hw-24-storyboard-%E9%9B%BB%E5%AD%90%E6%9B%B8-app-39d5174aed91?source=rss-d4329b30d2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/39d5174aed91</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[彼得潘ios作業]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Julie Kuo]]></dc:creator>
            <pubDate>Wed, 11 Mar 2020 21:36:47 GMT</pubDate>
            <atom:updated>2020-03-30T06:56:51.934Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UORQJW2d4DapBgwEhR4Zig.jpeg" /></figure><blockquote>作業目的：不寫程式也能做一個電子書 App<br>練習對象：咖啡界的Apple －Blue Bottle Coffee ❤</blockquote><h4>[第一步當然要建立一個美美的App Icon啊！]</h4><p>⤵︎App剛建立時的App Icon什麼都沒有，只有簡單幾何線條</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*tMxOYFQFL3rCTncy194zTA.png" /></figure><p>⤵︎可以透過下述網站把想要呈現的icon圖案丟進去，產生符合ios需求格式的icon</p><p><a href="https://makeappicon.com/">Developer Tool - App Icon Resizer</a></p><p>⤵︎下載icon後，將圖檔放入Assets裡的AppIcon，因為現在是要製作iPhone App，所以至少要放iPhone App 60pt格式</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ZvlVBKVne14Oyf0d_WRPQ.png" /></figure><p>⤵︎完成後就可以獲得心愛的icon了❤</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*b-rOzRbmUqtN6gpG00a5pA.png" /></figure><h4>[修改AppName]</h4><p>一開始建立專案時可以先給專案/App一個假定命名，之後經過反覆的深思熟慮後再從右側的Inspector area去修改一個霸氣的新名字。確定要修改後，義無反顧點選Rename和continue即可</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTbB7YFaBe5WYgqrMM710g.png" /></figure><p>⤵︎完成後App獲得新名字!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*qOTbjRhC5MrXWkDMOfmmlA.png" /></figure><h4>[建立App開場畫面]</h4><p>從LaunchScreen.storyboard進入新增一個View controller scene，畫布裡面放入想要在App開啟時出現的畫面，大約會出現兩秒左右，之後就會進入主畫面(Main.storyboard)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*Y8uh0e71UKyFPoxCEsXaRg.png" /></figure><h4>[設定進入App後顯示的第一頁]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*FYMZy5V1Lci-BsQmTT-bSg.png" /></figure><ol><li>在心儀的畫布上勾選Is Initial View Controller，或者把唯一的箭頭拉到畫布上</li><li>試著放上各種UI元件，例如view/image view/button…</li><li>試著新增客製字體到xcode中並使用</li></ol><h4>[Navigation controller]</h4><p>用途：讓使用者可以透過點選畫布左上方(區塊5&amp;6)返回上一頁。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHal9AwcTn58pN5oK0Vp7A.png" /></figure><ol><li>只要設定一次/一個主頁，之後由該主頁(區塊1)衍伸的支頁都可以共用Navigation controller。</li><li>可以透過Navigation Item(區塊7)調整Navigation的title/back button顯示的文字/顏色，若空白則不會顯示。</li><li>Large title可設定是否維持放大字體。</li><li>如果支頁沒有顯示Navigation Item(區塊7)，可自行從Library加入，以做上述的設定調整。</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*wLqtlj_uGQb5yvFCvPxHcA.gif" /></figure><h4>[Tab bar controller]</h4><p>用途：在App畫面下方最多一次顯示5個分頁，方便使用者瀏覽。當第6個分頁產生時，左側只會顯示4個分頁，其餘的分頁會縮到右邊，並自動產生一頁清單顯示。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2e6Kd92TyRL1Z7nYgKO2Q.png" /></figure><p>使用方式類似Navigation controller，只是右下改選Tab Bar Controller</p><p>建立Tab Bar Controller後(區塊3)，Initial的箭頭會跑到Tab Bar Controller的左側</p><p>畫布下方可以開始連結其他分頁(區塊4)！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LfDzTalB1RTO6R3PX31Sfg.png" /></figure><p>分頁建立方式是按滑鼠右鍵，從A點(Tab Bar Controller)拉到B點(目標分頁)，放開後選擇view controllers即可</p><p>其他備註：</p><ol><li>可在tab bar controller scene上拖曳tab，以改變分頁順序</li><li>可放上系統內建或自己設計的icon(可彩色)和文字</li><li>可變換點選時/未點選時的icon與其顏色</li><li>不論在App畫面上方點選多少內容/層級，都可以透過tab bar一鍵回到主頁</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*n7zP-sS20xKInKud-Bpedg.gif" /></figure><h4>[Scroll view]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*bFPgaZJOGisiwmwy6RX5yQ.png" /></figure><p>⤶新手製作捲動頁面的方法，在Scroll View底下添加View再添加圖檔</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*BBdDVRuD9BMj6qS3dxAXIQ.png" /></figure><p>⤶搭配Key Path使用，</p><p>欲左右捲動則設定 contentSize {+x,0}</p><p>欲上下捲動則設定 contentSize {0,+y}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*MuDelTcP-G3p05EatKn-fA.png" /></figure><p>⤶勾選Paging Enable可使捲動時畫面自動分頁，避免使畫面懸浮在一半</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*7lEXwzduLl3W7mCEt2ci5A.gif" /></figure><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-storyboard-%E8%A8%AD%E5%AE%9A-content-size-%E5%AF%A6%E7%8F%BE%E6%B0%B4%E5%B9%B3%E6%8D%B2%E5%8B%95%E7%9A%84-scroll-view-2710fa247293">設定 content size，實現水平捲動，上下捲動和分頁的 scroll view</a></p><h4>[Table view controller]</h4><p>稍微進階製作捲動頁面的方法！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*0E1K8gJOGj95Qc27jxpEXg.gif" /></figure><h4>[第一類]初級</h4><ul><li>單一Section</li><li>開啟Selection顯示按鍵</li><li>每一row可按壓，並指向支頁</li><li>Header/Footer空白(即不顯示)</li><li>設定Table View Cell背景顏色(淺藍色)</li><li>點選時Cell背景會變色(淺藍色和白色)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*CiG7-PjeB6wWOsUUM4QXqg.gif" /></figure><h4>[第二類]變化</h4><ul><li>多個Section</li><li>不啟用Selection顯示按鍵及按壓</li><li>在Container View底下建立Table view controller</li><li>照片牆模式：每一row改以button*3各自指向支頁</li><li>顯示Header/隱藏Footer</li><li>此時架構為View Controller&gt;Container View&gt;Table view controller&gt;button&gt;View Controller，最後一層的View Controller要先製作好再連結到Table，不然畫布會變很小</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*pHcH5IoWTxBmoT_s1l2kGQ.gif" /></figure><h4>[第三類]混搭</h4><ul><li>單一Section</li><li>不啟用Selection顯示按鍵及按壓</li><li>在Container View底下建立Table view controller</li><li>照片牆模式：每一row改以button*2各自指向支頁</li><li>隱藏Header/Footer</li><li>設定背景圖片，Table背景設為透明</li></ul><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/%E8%A8%AD%E5%AE%9A%E8%A1%A8%E6%A0%BC%E7%9A%84%E8%83%8C%E6%99%AF%E5%9C%96%E7%89%87-45508aa6f630">設定表格的背景圖片</a></p><h4>[修改view/image邊框]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*wMIrEpvsQ1mJI5wimXUtCw.png" /></figure><ul><li>搭配Key Path使用</li><li>圓角/弧角 layer.cornerRadius</li><li>邊框 layer.borderWidth</li></ul><h4>[Text View]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*XCm9pHN7-PmriS9UyRamug.gif" /></figure><ul><li>捲動文字框</li><li>可自動偵測地圖/電話/連結等功能</li></ul><h4>[To be cont.]</h4><p>做到這邊，Storyboard已經爆炸多畫布，MAC(眼皮)也快撐不住了🤣，之後的練習勢必要開reference，先存下reference使用方式，之後學會更進階的技巧時，可以開reference繼續完成App其他功能！Dark mode下集待續～XD</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%E5%A4%9A%E5%80%8B-storyboard-%E5%92%8C-storyboard-reference-%E8%A3%BD%E4%BD%9C-app-%E7%95%AB%E9%9D%A2-e0d513fb5bcb">利用多個 storyboard 和 storyboard reference 製作 App 畫面</a></p><h4>[Github] 完整程式碼</h4><p><a href="https://github.com/TricK0rTreAt/Blue-Bottle">TricK0rTreAt/Blue-Bottle</a></p><p>[P.S.] 練習素材皆來自Blue Bottle Coffee官網/APP和網路資源</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39d5174aed91" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/xcode-hw-24-storyboard-%E9%9B%BB%E5%AD%90%E6%9B%B8-app-39d5174aed91">[Xcode HW] #24 Storyboard 電子書 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[[Xcode] Simulator tips]]></title>
            <link>https://medium.com/@julie.kuo21/xcode-simulator-tips-81179e86458d?source=rss-d4329b30d2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/81179e86458d</guid>
            <category><![CDATA[simulator]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Julie Kuo]]></dc:creator>
            <pubDate>Wed, 04 Mar 2020 10:21:14 GMT</pubDate>
            <atom:updated>2020-03-05T08:09:34.505Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>#1 關閉不需要的模擬器</strong></p><p>點選不需要的模擬器 &gt; Menu &gt; File &gt; Close Window</p><p>點選不需要的模擬器 &gt; cmd+W</p><p><strong>#2 刪除模擬器上的app</strong></p><p>就像使用實體裝置一樣，滑鼠左鍵長按要刪除的app &gt; Delete App</p><p><strong>#3 移動模擬器</strong></p><p>點選裝置右上外緣空白區域拖曳</p><p>點選裝置螢幕以外的區域拖曳</p><p><strong>#4 縮放模擬器</strong></p><p>點選裝置四角邊緣線域拖曳縮放</p><p>…to be continued.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81179e86458d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[About…]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/about-279f9b54770b?source=rss-d4329b30d2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/279f9b54770b</guid>
            <dc:creator><![CDATA[Julie Kuo]]></dc:creator>
            <pubDate>Tue, 03 Mar 2020 15:16:34 GMT</pubDate>
            <atom:updated>2020-03-03T18:56:27.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*MRx1C4L_pQ8FHzV25LvdWA.jpeg" /></figure><blockquote>About…</blockquote><p>這篇自介是為了彼得潘的 iOS App Neverland寫的，但其實帳號已經開了一陣子，本意想寫幾篇移民相關的流程做紀錄也幫助後人，可是我的拖延症實在太深根地固，拖到現在都沒一個影，就連要擠出自我介紹都要逃避一整天。</p><p>想了想，這種拖延的症頭大概是因為害怕結果不完美。只要不開始就不用面對挫敗，但如果不開始，怎麼有機會遇見成功呢，不跨出第一步，未來連懊悔的權利都沒有，逃避在這時候既可恥又沒用！鄉民常言道「努力不一定成功，但是不努力一定會很輕鬆喔！」，比起不知從何說起的自我介紹，先把這些醜話寫在前，不論是學習iOS或是各種大小事，時時警惕自己不要三分熟，呃不是，是三分鐘熱度，應該會更有幫助。(也很可能因此有一天會一邊看這篇文章，一邊哭著寫完彼得潘交辦的作業)</p><p>所以最後，來學iOS App程式設計並不奢望可以藉此求得一官半職，只是想一圓自己的程式夢:D</p><blockquote>You don’t have to be Perfect. Just be Better than yesterday. :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=279f9b54770b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/about-279f9b54770b">About…</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>