<?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 Daisy on Medium]]></title>
        <description><![CDATA[Stories by Daisy on Medium]]></description>
        <link>https://medium.com/@chenwing0462?source=rss-9415654fa854------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*AIGpFkOQeu1TA5qP</url>
            <title>Stories by Daisy on Medium</title>
            <link>https://medium.com/@chenwing0462?source=rss-9415654fa854------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 02:19:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chenwing0462/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那件事#11．【ＯＯ想來點】]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-11-%EF%BD%8F%EF%BD%8F%E6%83%B3%E4%BE%86%E9%BB%9E-2cebcfe126e3?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cebcfe126e3</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios-apps]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Sun, 30 Aug 2020 07:42:16 GMT</pubDate>
            <atom:updated>2020-08-30T09:56:32.064Z</atom:updated>
            <content:encoded><![CDATA[<h3>主軸練習：</h3><p>1.頁面間的資訊傳遞（搭配IBSegueAction）</p><p>2.亂數設定（int.random）</p><p>3.import不同的模組（UIkit+Webkit）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*xVUSvfRxa3nLaV9bKPtK7Q.jpeg" /><figcaption>學會寫程式控制後，畫面立馬精簡</figcaption></figure><h3>次要設計及想法：</h3><ol><li>參考uberEat的配色：綠為關鍵色，白黑為底</li><li>結合有趣的主題，開發實用APP</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*SFx4z2cBcadi4ljkP3ojfg.gif" /><figcaption>點點點（點餐APP）</figcaption></figure><p><a href="https://github.com/Daisy-1988/AUGEST2">Daisy-1988/AUGEST2</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cebcfe126e3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-11-%EF%BD%8F%EF%BD%8F%E6%83%B3%E4%BE%86%E9%BB%9E-2cebcfe126e3">寫APP那件事#11．【ＯＯ想來點】</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那件事#10．【健康護照】]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-10-%E5%81%A5%E5%BA%B7%E8%AD%B7%E7%85%A7-667772491394?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/667772491394</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Mon, 17 Aug 2020 10:44:01 GMT</pubDate>
            <atom:updated>2020-08-17T15:04:15.515Z</atom:updated>
            <content:encoded><![CDATA[<p>使用 IBOutlet，IBAction &amp; 亂數創作有趣的 App</p><h3>練習項目：</h3><h3><strong>1.性別(男/女)控制view背景顏色</strong></h3><h3>2.溫度slider顯示數字，根據數字變化顏色</h3><h3>3.根據問題判斷，人像顏色及狀態</h3><h3>4.ID為亂碼產生</h3><h3>5.NEW-新增一筆資料，更新畫面</h3><h3>6.DATE-右上角帶入年月日</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*-4wOP2Cs69Uf4j6w-4yCOg.gif" /><figcaption>越做越上手～ 太感人了 🎉</figcaption></figure><pre>import UIKit</pre><pre>class blueViewController: UIViewController {<br>    <br>    <br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var timetext: UILabel!<br>    <br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var nametext: UITextField!<br>    <br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var tempertureState: UILabel!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var healthState: UITextField!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var idNumber: UITextField!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var viewBackground: UIView!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var photoFile: UIImageView!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var tempertureDegree: UILabel!<br>    <br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var sliderDegree: UISlider!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var aboardOption: UISegmentedControl!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var placeOption: UISegmentedControl!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var travelOption: UISegmentedControl!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var illnessOption: UISegmentedControl!</pre><pre>override func viewDidLoad() {<br>        super.viewDidLoad()<br>       <br>        let today=Date()<br>        let dateFormatter=DateFormatter()<br>        dateFormatter.dateFormat=&quot;MM/dd/yyyy&quot;<br>        timetext.text!=dateFormatter.string(from: today)<br>        <br>        // Do any additional setup after loading the view.<br>    }</pre><pre>//性別(男/女)控制view的背景顏色<br>    <a href="http://twitter.com/IBAction">@IBAction</a> func countGender(_ sender: UISegmentedControl) {<br>        <br>        let numberGender=sender.selectedSegmentIndex<br>        switch numberGender {<br>        case 0:<br>            viewBackground.backgroundColor=UIColor.systemBlue<br>        case 1:<br>            viewBackground.backgroundColor=UIColor.systemRed<br>        default:<br>            viewBackground.backgroundColor=UIColor.white<br>        }<br>    }<br>    <br>    //溫度顯示數字，呈現標語<br>    <a href="http://twitter.com/IBAction">@IBAction</a> func changeDegree(_ sender: UISlider) {<br>        let degree=sender.value<br>       <br>        let showdegree=String(format:&quot;%.1f&quot;,degree)<br>        <br>        tempertureDegree.text!=showdegree<br>        <br>        switch degree {<br>        case 37.0...38.0:<br>            tempertureDegree.textColor=UIColor.systemOrange<br>            tempertureState.text!=&quot;注意體溫&quot;<br>            tempertureState.textColor=UIColor.systemOrange<br>        case 38.0...39.0:<br>            tempertureDegree.textColor=UIColor.systemRed<br>            tempertureState.text!=&quot;體溫過高&quot;<br>            tempertureState.textColor=UIColor.systemRed<br>        default:<br>            tempertureDegree.textColor=UIColor.black<br>            tempertureState.text!=&quot;體溫正常&quot;<br>            tempertureState.textColor=UIColor.black<br>        }<br>       <br>    }<br>    <br>    <br>    //判斷：三個以上有（紅色），一個以上有（橘色） 全無（綠色）<br>    //狀態：呈現對應文字及顏色<br>    var sumaboard=Int()<br>    var sumplace=Int()<br>    var sumtravel=Int()<br>    var sumillness=Int()<br>    <br>    <br>    <a href="http://twitter.com/IBAction">@IBAction</a> func showOption(_ sender: UISegmentedControl) {<br>        <br>      <br>        <br>        if sender==aboardOption{<br>              sumaboard=sender.selectedSegmentIndex<br>        } else if sender==placeOption{<br>                    sumplace=sender.selectedSegmentIndex<br>            }<br>        else if sender==travelOption{<br>             sumtravel=sender.selectedSegmentIndex<br>            <br>        }<br>        else if sender==illnessOption{<br>            sumillness=sender.selectedSegmentIndex<br>    <br>            }<br>            <br>        let sum=sumaboard+sumplace+sumtravel+sumillness<br>            <br>        let imageview0=UIImageView(image: UIImage(named: &quot;0&quot;))<br>        let imageview1=UIImageView(image: UIImage(named: &quot;1&quot;))<br>        let imageview2=UIImageView(image: UIImage(named: &quot;2&quot;))<br>        let imageview3=UIImageView(image: UIImage(named: &quot;3&quot;))<br>        <br>        <br>        switch sum {<br>        case 3,4:<br>            photoFile.image=imageview3.image<br>            <br>            healthState.text!=&quot;危險&quot;<br>            healthState.backgroundColor=UIColor.red<br>        case 1,2:<br>            photoFile.image=imageview2.image<br>            healthState.text!=&quot;注意&quot;<br>            healthState.backgroundColor=UIColor.orange<br>        case 0:<br>            photoFile.image=imageview1.image<br>            healthState.text!=&quot;安全&quot;<br>            healthState.backgroundColor=UIColor.green<br>            <br>        default:<br>            photoFile.image=imageview0.image<br>            }<br>        <br>        <br>            }<br>        <br>        <br>        <br>        <br>    <a href="http://twitter.com/IBAction">@IBAction</a> func reNew(_ sender: UIButton) {<br>        <br>        <br>        tempertureDegree.text!=String(&quot;37&quot;)<br>        tempertureDegree.textColor=UIColor.black<br>        sliderDegree.value=37<br>        aboardOption.selectedSegmentIndex=0<br>        placeOption.selectedSegmentIndex=0<br>        travelOption.selectedSegmentIndex=0<br>        illnessOption.selectedSegmentIndex=0<br>        healthState.text!=&quot;&quot;<br>        healthState.backgroundColor=nil<br>        <br>        viewBackground.backgroundColor=UIColor.white<br>        <br>    let imageview0=UIImageView(image: UIImage(named: &quot;0&quot;))<br>       <br>        photoFile.image=imageview0.image<br>       <br>        <br>        idNumber.text!=&quot;NO.&quot;+Int.random(in: 0...1000).description<br>        idNumber.backgroundColor=UIColor.white<br>        <br>        nametext.text!=&quot;&quot;<br>        tempertureState.text!=&quot;&quot;<br>        <br>    <br>    }<br>   <br>            <br>        }</pre><p>參考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%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E8%AB%8B%E5%95%8F-swift-%E5%A4%A7%E5%A4%A7-%E4%BB%8A%E5%A4%A9%E6%98%9F%E6%9C%9F%E5%B9%BE-bf2935e33b6">請問 Swift 大大，今天幾月幾號星期幾 ?</a></p><h3>GitHub連結：</h3><p><a href="https://github.com/Daisy-1988/AUGEST1">Daisy-1988/AUGEST1</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=667772491394" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-10-%E5%81%A5%E5%BA%B7%E8%AD%B7%E7%85%A7-667772491394">寫APP那件事#10．【健康護照】</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那件事#9．客製 App 畫面]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-9-%E5%AE%A2%E8%A3%BD-app-%E7%95%AB%E9%9D%A2-6f25f39b934d?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f25f39b934d</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Sun, 16 Aug 2020 12:20:48 GMT</pubDate>
            <atom:updated>2020-08-16T12:36:58.820Z</atom:updated>
            <content:encoded><![CDATA[<p>溫故知新篇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*NhEKhm-wHZqH2TvupjyK6A.gif" /><figcaption>用程式寫出的起始畫面，而不是用storyboard拉出</figcaption></figure><h3>＊程式畫圖步驟1234</h3><h4>1.<strong>利用 UIBezierPath 繪製路徑（B）</strong></h4><p>繪製前，需先製作一個view-畫板（A）</p><pre>製作畫板</pre><pre><strong>let view = UIView()</strong></pre><pre>常用路徑寫法如下:</pre><pre>1.線條：<strong> </strong>let path = UIBezierPath()<br>path.move(to: <em>CGPoint(x: 0, y: 0)</em>)<br>path.addLine(to: <em>CGPoint(x: 10, y: 10)</em>)<br>path.close()</pre><pre>2.圓形：let path = UIBezierPath<em>(ovalIn: CGRect(x: 0, y: 0, width: 10, height: 10))</em></pre><pre>3.長方形： let path = UIBezierPath<em>(rect: CGRect(x: 0, y: 0, width: 10, height: 10))</em></pre><pre>4.圓角長方形： let path=UIBezierPath.init<em>(roundedRect:CGRect(x: 0, y: 0, width: 10, height: 10), cornerRadius: 5)</em></pre><pre><strong>From:Peter的補充</strong><br>若只想特定方位有圓角，利用 UIBezierPath 的init(roundedRect:byRoundingCorners:cornerRadii:)<br><em>byRoundingCorners:</em> 型別為 UIRectCorner，控制長方形圓角的位置。<br><em>cornerRadii: </em>控制圓角的程度，在此我們傳入的 CGSize 只要指定寬度即可，高度可設為 0。</pre><pre>【寫法】<br>let path = UIBezierPath(roundedRect: CGRect(x: 10, y: 10, width: 80, height: 50), byRoundingCorners: [.bottomLeft, .bottomRight], cornerRadii: CGSize(width: 5, height: 0))</pre><pre>5.在圓上的曲線：<br>let aDegree = CGFloat.pi / 180<br>let path = UIBezierPath<em>(arcCenter: CGPoint(x: 0, y: 0), radius: 10, startAngle: aDegree * 0, endAngle: aDegree * 180, clockwise: true)</em></pre><pre>6-1.特定弧度的曲線，1個控制點：<br>path.addQuadCurve<em>(to: CGPoint(x: 10, y: 10), controlPoint: CGPoint(x: 50, y: 50))<br></em>6-2.特定弧度的曲線，2個控制點：<br>path.addCurve<em>(to: CGPoint(x: 10, y: 10), controlPoint1: CGPoint(x: 50, y: 50), controlPoint2: CGPoint(x: 80, y: 80))</em></pre><p>參考1.運用 UIBezierPath 繪製各種形狀</p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E9%81%8B%E7%94%A8-uibezierpath-%E7%B9%AA%E8%A3%BD%E5%BD%A2-3c858e194676">運用 UIBezierPath 繪製各種形狀</a></p><h4>2.利用<strong> CAShapeLayer製作圖層（C）</strong></h4><h4>3.最後把 CAShapeLayer 加到 view 上（A）</h4><p>讓路徑-線條( B )/圖層-紙張( C )，都能覆蓋於畫板( A )上</p><pre>let circleLayer = CAShapeLayer()<br>circleLayer.path = path.cgPath</pre><pre><strong>應用1-填滿，內建為黑色</strong><br> view.layer.addSublayer(circleLayer)  <br><strong>應用2-只有線條，需設定顏色／寬度</strong><br> circleLayer.strokeColor = CGColor(Red: 10, green: 10, blue: 10, alpha: 1)<br>circleLayer.lineWidth = 10<br>view.layer.addSublayer(circleLayer)</pre><h4>4.進階調整- 讓View縮放/位移/旋轉/鏡像翻轉</h4><pre>1.縮放<strong>5倍</strong><br>寫法1-View.transform = CGAffineTransform(<strong>scaleX: 5, y: 5</strong>)<br>寫法2-View.transform = CGAffineTransform.identity.scaledBy<strong>(x: 5, y: 5)</strong></pre><pre>2.位移<br>View.transform = CGAffineTransform<strong>(translationX: 10, y: 50)</strong></pre><pre>3.旋轉<br>let oneDegree = CGFloat.pi / 180<br>View.transform = CGAffineTransform<strong>(rotationAngle: oneDegree * 45)</strong></pre><pre>4.鏡像翻轉<br>View.transform = CGAffineTransform<strong>(scaleX: -1, y: 1)</strong></pre><pre>From:Peter的提醒<br>結合縮放，位移和旋轉值得注意的，結合縮放，位移和旋轉時，順序很重要，因為背後牽扯到矩陣的數學運算，所以先 translatedBy 再 scaledBy 跟先 scaledBy 再 translatedBy 是不一樣的，通常先 translatedBy 再 scaledBy 會是我們想要的效果。</pre><pre>【寫法】<br>let oneDegree = CGFloat.pi / 180<br>View.transform = CGAffineTransform.identity.translatedBy(x: 100, y: 300).scaledBy(x: 0.5, y: 0.5).rotated(by: oneDegree * 45)</pre><p>參考2.</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/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><h3>＊動畫（加在layer上）</h3><pre>動畫<strong>［到達終點］</strong><br>let animation = CABasicAnimation(keyPath: <strong>&quot;strokeEnd&quot;</strong>)<br>animation.fromValue = 0<br>animation.toValue = 1<br>animation.duration = 5<br>.....Layer.add(animation, forKey: nil)</pre><pre>重覆的動畫<br>animation.repeatCount = .greatestFiniteMagnitude</pre><pre>清除線條的動畫效果<strong>［回到起點］</strong><br>let animation = CABasicAnimation(keyPath: <strong>&quot;strokeStart&quot;</strong>)<br>animation.fromValue = 0<br>animation.toValue = 1<br>animation.duration = 5<br>.....Layer.add(animation, forKey: nil)</pre><p>參考3.</p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84%E8%A9%A6%E7%85%89-%E5%8B%87%E8%80%85%E7%9A%84-100-%E9%81%93-swift-ios-app-%E8%AC%8E%E9%A1%8C/%E5%88%A9%E7%94%A8-cabasicanimation-cashapelayer-%E7%B9%AA%E8%A3%BD%E7%B7%9A%E6%A2%9D%E5%8B%95%E7%95%AB-dc08b4db4726">#82 利用 CABasicAnimation &amp; CAShapeLayer 繪製線條動畫</a></p><h3>＊加入文字（使用mask）</h3><p>本來想做個漸層文字，但有漸層，文字就跑掉，文字置中下方，就沒漸層</p><p>漸層與置中，不可兼得</p><pre>import SwiftUI<br>struct DrawView: UIViewRepresentable {<br>    func makeUIView(context: Context) -&gt; UIView {<br>        let view = UIView()<br>        //circle<br>        let circlepath = UIBezierPath(ovalIn: CGRect(x: 30, y: 160, width: 320, height: 320))<br>           <br>             let circleLayer = CAShapeLayer()<br>             circleLayer.path = circlepath.cgPath<br>            circleLayer.fillColor=UIColor.systemPink.cgColor<br>       <br>             circleLayer.strokeColor = CGColor(red: 220/255, green:100/255, blue: 100/255, alpha: 255)<br>             circleLayer.lineWidth = 15<br>             view.layer.addSublayer(circleLayer)<br>        <br>             //love1<br>             let love1view=UIView()<br>             let love1path=UIBezierPath.init(roundedRect:CGRect(x: 340, y: -30, width: 100, height: 200),byRoundingCorners:[.topLeft,.topRight] ,cornerRadii: CGSize(width: 50, height: 0))<br>             let love1Layer=CAShapeLayer()<br>             love1Layer.path=love1path.cgPath<br>        love1Layer.fillColor=UIColor.white.cgColor<br>        <br>            love1view.layer.addSublayer(love1Layer)<br>             let oneDegree = CGFloat.pi / 180<br>             love1view.transform = CGAffineTransform(rotationAngle: oneDegree * 45)<br>        <br>        //love2<br>        let love2view=UIView()<br>        <br>        let love2path=UIBezierPath.init(roundedRect:CGRect(x: -170, y: 240, width: 100, height: 200),byRoundingCorners:[.topLeft,.topRight] ,cornerRadii: CGSize(width: 50, height: 0))<br>        <br>        let love2Layer=CAShapeLayer()<br>        love2Layer.path=love2path.cgPath<br>        love2Layer.fillColor=UIColor.white.cgColor<br>       love2view.layer.addSublayer(love2Layer)<br>        love2view.transform = CGAffineTransform(rotationAngle: oneDegree * -45)<br>        view.addSubview(love1view)<br>        view.addSubview(love2view)<br>       <br>       //animation<br>            let animation = CABasicAnimation(keyPath: &quot;strokeEnd&quot;)<br>            animation.fromValue = 0<br>        animation.toValue = 1<br>            animation.duration = 5<br>            animation.repeatCount = .greatestFiniteMagnitude<br>            circleLayer.add(animation, forKey: nil)<br>   <br>        //label<br>        let lable=UILabel()<br>        lable.text=&quot;iTalk&quot;<br>        lable.font=UIFont.systemFont(ofSize: 100)<br>        lable.sizeToFit()<br>        let lableview=UIView(frame:CGRect(x: 100, y: 500, width: 500, height: 500))<br>       let gradientLayer=CAGradientLayer()<br>        gradientLayer.frame=lableview.bounds<br>        gradientLayer.colors=[UIColor.systemBlue.cgColor,UIColor.systemRed.cgColor]<br>        lableview.layer.addSublayer(gradientLayer)<br>        lableview.mask=lable<br>        <br>        view.addSubview(lableview)<br>     <br>        return view<br>       <br>    }<br>    <br>    func updateUIView(_ uiView: UIView, context: Context) {<br>    }<br>    <br>}<br>struct ContentView: View {<br>    var body: some View {<br>        DrawView()<br>    }<br>}<br>struct ContentView_Previews: PreviewProvider {<br>    static var previews: some View {<br>        ContentView()<br>    }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f25f39b934d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-9-%E5%AE%A2%E8%A3%BD-app-%E7%95%AB%E9%9D%A2-6f25f39b934d">寫APP那件事#9．客製 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[寫APP那件事#8.購物 App -UIStepper 和數字變字串練習]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-8-%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-7667da9ae1e8?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/7667da9ae1e8</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Fri, 14 Aug 2020 15:12:32 GMT</pubDate>
            <atom:updated>2020-08-23T07:25:47.735Z</atom:updated>
            <content:encoded><![CDATA[<h3>寫APP那件事#8・購物 App -UIStepper 和數字變字串練習</h3><p>達到第一個里程碑，終於集滿十項作業囉！👏</p><h4>練習內容</h4><ol><li><strong>自建class:TableViewController</strong>，為了可修改內建設定<br>需到file-new-file新增class</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x2WsfjmiSBotpITRR6KIBQ.jpeg" /></figure><p><strong>2.將畫面元件拉@IBOutlet</strong>，可即時呈現執行動作（例如：點選）後的改變</p><p><strong>3.將點選元件拉@IBAction</strong>，可呈現執行動作，購物網站主要是數量的改變，因此使用UIStepper的元件</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*X1IRDt6aLvNymuS-rFnoMw.gif" /><figcaption>左側（點選元件）；右側（畫面元件）</figcaption></figure><p>4.完成簡易版的桌遊購買APP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*fCaNGEKpGXV_xqa2u6gsZA.gif" /><figcaption>終於打完收工了😭</figcaption></figure><blockquote>需注意的細節(集眾人智慧 from Peter及前人)：<br>1.static cells 的表格，繼承 UITableViewController 的類別，拿掉 function numberOfSections(in:) &amp; tableView(_:numberOfRowsInSection:)，否則將造成表格一片空白。<br>2.若使用textfield拉outlet，要將control處的enables勾選取消，否則點選空格可編輯內容，會造成閃退。<br>3.Table view cell 的selection處，可選擇None，否則點選到會變色。</blockquote><p>GitHub連結：</p><p><a href="https://github.com/Daisy-1988/AUGEST">Daisy-1988/AUGEST</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7667da9ae1e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-8-%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-7667da9ae1e8">寫APP那件事#8.購物 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[寫APP那件事#7．【HOW DO YOU LOOK TODAY?】via Open Peeps 圖庫開發紙娃娃 App]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-7-how-do-you-look-today-via-open-peeps-%E5%9C%96%E5%BA%AB%E9%96%8B%E7%99%BC%E7%B4%99%E5%A8%83%E5%A8%83-app-87904f5585e0?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/87904f5585e0</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Sat, 01 Aug 2020 03:30:12 GMT</pubDate>
            <atom:updated>2020-08-01T04:42:42.039Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*MBdFBbPmCvq0r5Jx5Gpomg.gif" /></figure><pre>import UIKit</pre><pre>class ViewController: UIViewController {</pre><pre><a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var face: UIImageView!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var titleword: UILabel!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var humanBody: UIImageView!<br>    <a href="http://twitter.com/IBOutlet">@IBOutlet</a> weak var womanHead: UIImageView!<br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        // Do any additional setup after loading the view.<br>    }</pre><pre><a href="http://twitter.com/IBAction">@IBAction</a> func bodys(_ sender: UIButton) {<br>        let image=sender.currentImage<br>        humanBody.image=image<br>    }<br>  <br>    <a href="http://twitter.com/IBAction">@IBAction</a> func head(_ sender: UIButton) {<br>        let image=sender.currentImage<br>        womanHead.image=image<br>    }<br>  <br>    <a href="http://twitter.com/IBAction">@IBAction</a> func facebuttom(_ sender: UIButton) {<br>        let image=sender.currentImage<br>        face.image=image<br>    }</pre><pre><a href="http://twitter.com/IBAction">@IBAction</a> func genderColor(_ sender: UISegmentedControl) {<br>        <br>        let number = sender.selectedSegmentIndex<br>        if number == 1{<br>        titleword.textColor=UIColor.systemPink<br>        }<br>        else<br>        { titleword.textColor=UIColor.systemBlue}<br>        <br>    }<br>    <br>    <a href="http://twitter.com/IBAction">@IBAction</a> func restart(_ sender: UIButton) {<br>        <br>        let image1 = UIImage(named: &quot;head0&quot;)<br>        womanHead.image=image1<br>        let image2 = UIImage(named: &quot;body2&quot;)<br>        humanBody.image=image2<br>        let image3 = UIImage(named: &quot;Awe&quot;)<br>        face.image=image3</pre><pre>}<br>    <br> }</pre><h3>最難的不是花時間寫，而是滿滿的公式，卻無法流暢地帶入，在腦中一片空白 ，幸好有很多前輩的程式碼可參考。</h3><p>魔王1.須將image定義為sender現在呈現的圖片【而sender由物件決定，有可能是button或是SegmentedControl】</p><pre>let image=sender.currentImage<br>        womanHead.image=image</pre><p>魔王2.當SegmentedControl調整時，男生（字體藍色）女生（字體紅色）<br>先讓number讀出selectedSegmentIndex的數值，再用 if 來判斷顏色為何</p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func genderColor(_ sender: UISegmentedControl) {<br>        <br>        let number = sender.selectedSegmentIndex<br>        if number == 1{<br>        titleword.textColor=UIColor.systemPink<br>        }<br>        else<br>        { titleword.textColor=UIColor.systemBlue}<br>        <br>    }</pre><p>魔王3.想按restart按鈕時，即可恢復到原始圖樣</p><pre><a href="http://twitter.com/IBAction">@IBAction</a> func restart(_ sender: UIButton) {<br>        <br>        let image1 = UIImage(named: &quot;head0&quot;)<br>        womanHead.image=image1<br>        let image2 = UIImage(named: &quot;body2&quot;)<br>        humanBody.image=image2<br>        let image3 = UIImage(named: &quot;Awe&quot;)<br>        face.image=image3</pre><pre>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87904f5585e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-7-how-do-you-look-today-via-open-peeps-%E5%9C%96%E5%BA%AB%E9%96%8B%E7%99%BC%E7%B4%99%E5%A8%83%E5%A8%83-app-87904f5585e0">寫APP那件事#7．【HOW DO YOU LOOK TODAY?】via 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[寫APP那件事#6．新手碼農的作業集]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-6-%E6%96%B0%E6%89%8B%E7%A2%BC%E8%BE%B2%E7%9A%84%E4%BD%9C%E6%A5%AD%E9%9B%86-c339014f99c8?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/c339014f99c8</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Wed, 29 Jul 2020 13:17:23 GMT</pubDate>
            <atom:updated>2020-07-29T16:02:21.032Z</atom:updated>
            <content:encoded><![CDATA[<p>離開舒適圈（storyboard）跳入亂碼區（？？？）</p><h3>作業1.從 playground 調色去背圖片</h3><p>程序：去背圖片、寫程式</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*mSxXOq9TGqbTWjNIXOV9Bg.jpeg" /><figcaption>去背完成</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*nrurQArcXSSLZhaHcBGr6w.jpeg" /><figcaption>後置完成</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*4zhOgJlcGRzAoia2kA8uZg.jpeg" /><figcaption>後置圖片成功之背後的滿滿字母（惡意？）</figcaption></figure><h3>作業2.利用 iOS SDK 各式型別生成東西，設定它的屬性和呼叫方法</h3><p>從第三堂課開始，好多詞彙需要重新定義歸納，超燒腦的啦！！<br>幸好有peter製作詳細的ppt，可以一步一步學，但要內化還是需要打成自己的語言</p><p><strong>＃以下是Daisy 小筆記只代表本人理解後的一部分產物<br>1.東西＝型別Type（整數/文字/圖片）<br>2.屬性property（東西特徵）<br>加. {就是存取，不加括號}<br>3.功能 function a.k.a Method<br>加. {就是執行呼叫，加括號}<br>4.型別.屬性=可直接使用{不用在宣告}</strong></p><blockquote>2–1.用 AVPlayer 播音樂</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgoPQ-yBpFR3Be3GXP-VbA.jpeg" /><figcaption>複製程式碼＋在“ “中加入音樂網址即可</figcaption></figure><blockquote>2–2.用 AVPlayerViewController 播影片</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MEyVeDivOOMGoXKI-KvUWg.jpeg" /><figcaption>同上，不同的是最右側會出現『liveView』（實況圖）</figcaption></figure><p>重點：需輸入<strong>PlaygroundPage.current.liveView＝controller </strong>才會產出右圖般的畫面。<br>差很大：storyboard的操作(只要點選元件拉到畫面上就ok)，程式區的執行（每一個元件，都需要輸入code才能產出，輸入code才有畫面）</p><blockquote>2–3.顯示地圖＋地圖標記並呈現標題及次標</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQj9VPC48mnC1_dNSury3g.jpeg" /><figcaption>輸入經緯度，只有google知道這是哪 🤣</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*lDKIac8bCcs9E1IqP4C0Jg.gif" /><figcaption>土耳其・伊斯坦堡（2019）</figcaption></figure><h3>作業3.從程式製作國旗圖案</h3><p>基本款（法國，芬蘭）</p><pre><strong>import</strong> UIKit<br><strong>var</strong> rect = CGRect(x: 0, y: 0, width: 1800, height: 1100)<br><strong>let</strong> backgroundView = UIView(frame: rect)<br>backgroundView.backgroundColor = UIColor(red: 0/255, green: 53/255, blue: 128/255, alpha:255)<br>rect = CGRect(x: 0, y: 0, width: 500, height: 400)<br><strong>let</strong> leftside = UIView(frame: rect)<br>leftside.backgroundColor = UIColor(red: 255, green: 255, blue: 255, alpha: 255)<br>rect = CGRect(x: 800, y: 0, width: 1000, height: 400)<br><strong>let</strong> rightside = UIView(frame: rect)<br>rightside.backgroundColor = UIColor(red: 255, green: 255, blue: 255, alpha: 255)<br>rect = CGRect(x: 0, y: 700, width: 500, height: 400)<br><strong>let</strong> left1side = UIView(frame: rect)<br>left1side.backgroundColor = UIColor(red: 255, green: 255, blue: 255, alpha: 255)<br>rect = CGRect(x: 800, y: 700, width: 1000, height: 400)<br><strong>let</strong> right1side = UIView(frame: rect)<br>right1side.backgroundColor = UIColor(red: 255, green: 255, blue: 255, alpha: 255)<br>backgroundView.addSubview(leftside)<br>backgroundView.addSubview(rightside)<br>backgroundView.addSubview(right1side)<br>backgroundView.addSubview(left1side)<br>backgroundView</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yqG5FlAh6KlK4Mt0n7qA1w.jpeg" /><figcaption>芬蘭・看極光的好地方（2015）</figcaption></figure><pre><strong>import</strong> UIKit<br><strong>var</strong> rect = CGRect(x: 0, y: 0, width: 900, height: 600)<br><strong>let</strong> backgroundView = UIView(frame: rect)<br>backgroundView.backgroundColor = UIColor(red: 255, green: 255, blue: 255, alpha: 255)<br>rect = CGRect(x: 0, y: 0, width: 300, height: 600)<br><strong>let</strong> leftside = UIView(frame: rect)<br>leftside.backgroundColor = UIColor(red: 0/255, green: 35/255, blue: 149/255, alpha:255)<br>rect = CGRect(x: 600, y: 0, width: 300, height: 600)<br><strong>let</strong> rightside = UIView(frame: rect)<br>rightside.backgroundColor = UIColor(red: 237/255, green: 41/255, blue: 57/255, alpha:255)<br>backgroundView.addSubview(leftside)<br>backgroundView.addSubview(rightside)<br>backgroundView</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6JiCkL4VcS2ns4EttQ-Tw.jpeg" /><figcaption>英國・博物館逛不完之地（2015）</figcaption></figure><p>查座標好幫手（<strong><em> iview</em></strong>）<br><a href="https://yangcha.github.io/iview/iview.html">https://yangcha.github.io/iview/iview.html</a></p><h3>作業4.利用 UIView 的 mask 設計特別形狀的圖片</h3><p>經過前三個作業的洗禮，第四個更加上手，只要想通mask該如何使用，就不困難，假設Jobs被mask後，被設定成 透明圖，而蘋果以外的區域也被去背（呈現透明），透明遇上透明還是透明，而蘋果本身為不透明，此時透明遇上不透明Jobs’s eye 就出現啦！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rlE9bIW18UkROK-nPoroBA.jpeg" /><figcaption>兩張圖片尺寸不相等</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IKz_Ur6sV_v9hsGl_7oPGw.jpeg" /><figcaption>兩張圖片尺寸相等：appleImageView.frame=headImageView.frame</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*lajbLACwgPJbrbrmAmEkfQ.jpeg" /><figcaption>加點紅色點綴</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c339014f99c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-6-%E6%96%B0%E6%89%8B%E7%A2%BC%E8%BE%B2%E7%9A%84%E4%BD%9C%E6%A5%AD%E9%9B%86-c339014f99c8">寫APP那件事#6．新手碼農的作業集</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那件事#5．Storyboard 電子書 App【Smart Teach】]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-5-storyboard-%E9%9B%BB%E5%AD%90%E6%9B%B8-app-smart-teach-d38a9d8551d8?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/d38a9d8551d8</guid>
            <category><![CDATA[storyboard]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Mon, 27 Jul 2020 07:48:32 GMT</pubDate>
            <atom:updated>2020-07-27T10:39:13.769Z</atom:updated>
            <content:encoded><![CDATA[<h3>動手做做看電子書，動腦玩玩看桌遊</h3><p>寫程式跟玩遊戲一樣，計畫內容、執行步驟、重複回合<br>But 寫程式花的時間多很多🤣</p><h3><strong>從生活找靈感，創意無限多</strong></h3><p>＠桌遊 是2020的高頻關鍵字<br>就拿此為主題，將內容及說明書電子化</p><h3>1.豆哥動起來</h3><p><a href="https://www.flyingv.cc/projects/24627">〈豆哥動起來 Dog! Let&#39;s go!〉語言治療師 x 親子桌遊 | flyingV</a></p><p>參與了整套桌遊的開發及生產，工程浩大，但紙本內容不像程式說改就改，量產後，要修改就要等下一版囉！（哈～ 要去求神看看，下一版何時再續）電子書的好處，只要開Xcode 就改到你開心為止 😀</p><blockquote><strong>1–1.規劃內容</strong></blockquote><h4><strong>首頁（第一層，最左側一頁）</strong></h4><p><strong>角色介紹、遊戲部件介紹、影片教學<br></strong>所需工具： Tab bar controller、Navigation controller、Table view controller &amp; static cell、scroll view、stack view(最上圖使用，可讓此畫面在任何裝置或橫向使用時，皆在中間)、button、view、新增字體（粉圓字型）</p><h4><strong>次頁（第二層，右側數頁）</strong></h4><p><strong>角色圖（右上角新增搜尋鈕-{連接你最愛哪一個角色}-輸入按送出-{連接全角色圖}）<br>遊戲部件（分五頁）<br>影片教學（在首頁，於</strong>Table view 第三層，用subtitle style 將 text view<strong>{輸網址，設透明}置於上方，點選即可連到youtube</strong> <strong>）</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*dMGUhudM5Nxp2J6NYC8J8w.jpeg" /><figcaption>版面拆解圖</figcaption></figure><blockquote><strong>1–2.執行步驟</strong></blockquote><p>進入JULYS(app icon可自行更換)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*tFbhfubP5heWFvaTD2P1OA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*y1jFA9gMRsPVZuzIsCShPw.gif" /><figcaption>實際操作圖</figcaption></figure><blockquote><strong>1–3.重複回合</strong></blockquote><p>台上十分鐘，台下十年功概念，短短的30秒演示，工程師一定是做到爆肝感😱 Anyway 又完成了作業的一小部分，特別想分享的是，原來想改一個小細節(改tab bar的顏色)，花了一點時間找正確的路徑（印象中peter有說過，答案就在影片中呀，有錄影真好）。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FJ4GNWdEN1mOGm8QU31GYw.jpeg" /><figcaption>Tab Bar-Image Tint(改顏色處)</figcaption></figure><h3>2.醫森林（Listen it!）</h3><p>第二部分做起來就快多囉，時間是前一部分的1/3時間 🎉🎉🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*HvfRsRddZQ2Gc_h9iudOFg.jpeg" /><figcaption>版面拆解圖</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*HoccQjllWqT6_9chbUJQgA.gif" /><figcaption>實際操作圖</figcaption></figure><h3>3.集合囉！</h3><p>將上述兩個子集合（各別開storyboard製作），最後拉至Main.storyboard做整合，畫面簡潔又清楚 🙌</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*uCxiTH_ekKtH5iYCP8a1vw.jpeg" /></figure><p>參考來源</p><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8%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><h3>4.待學習領域 :Autolayout</h3><p>對stack view仍是一知半解，做出來的成品就是良莠不齊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mAvU7hav381uLnxptTAXPQ.jpeg" /><figcaption>成功：橫向（沒跑版）</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EpVO2Xx0PbNEFvrgBhVw-Q.jpeg" /><figcaption>失敗：橫向（跑版）</figcaption></figure><h3>5. 專案的 GitHub 連結</h3><p><a href="https://github.com/Daisy-1988/JULYS">Daisy-1988/JULYS</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d38a9d8551d8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-5-storyboard-%E9%9B%BB%E5%AD%90%E6%9B%B8-app-smart-teach-d38a9d8551d8">寫APP那件事#5．Storyboard 電子書 App【Smart Teach】</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那件事．scroll view]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-scroll-view-7e4605064ef4?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e4605064ef4</guid>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Wed, 22 Jul 2020 04:44:08 GMT</pubDate>
            <atom:updated>2020-08-23T07:26:45.151Z</atom:updated>
            <content:encoded><![CDATA[<h3>寫APP那件事#4．scroll view</h3><p>一指神功，滑上下換左右，就靠scroll view</p><blockquote><strong>技術是實現創意的工具，環境提供了我們許多創意，但你有沒有技術呈現呢？慶幸生在資源爆炸的時代，只要你願意學習技術，你的創意就能成真😊</strong></blockquote><h3>1.發想主題（創意time）</h3><p>從周遭發現主題，因為工作關係常有機會與孩子相處，他們的偶像不是五月天、周杰倫、BIGBAND等。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*Ymdm-wipA56lNxKfEGHRtQ.jpeg" /><figcaption>來源：google圖片</figcaption></figure><p>而是風靡兒童界的『Peppa Pig 粉紅豬小妹』與『波力救援小英雄』，從沒有看過一集，但從孩子的口中了解到角色及劇情。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*0ZrpMZzuMAwIrE76NmCkqQ.jpeg" /><figcaption>來源：google圖片</figcaption></figure><h3>2.拉畫面放圖片算長寬（技術time）</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*fsAcNbBcrF-APPlVibqfaA.jpeg" /></figure><h3>拉畫面</h3><p>2–1.新增View Controller(黃色)</p><p>2–2.新增View (白色)</p><p>2–3.新增ImageView(灰色)</p><p>2–4.新增ScrollView(透明灰色）</p><h3>放圖片</h3><p>有了上述元件後，放置圖片在ImageView內，調整在View的位置，最後加在ScrollView上方（關係階層：ImageView-View-ScrollView）</p><h3>算長寬</h3><p>最燒腦的環節，可用紙筆先算出預估數值，最後無腦輸入即可。</p><h3>3. try and error（找碴time）</h3><p>要是你放好圖、輸入數值，卻還是不如預期的執行，不用懷疑人生，一定要懷疑自己，絕對是哪個環節設置錯誤，找google、問peter是最佳解法。</p><blockquote>過來人經驗談：卡在上下scroll view無法移動，調整數值好多次，最後找出兇手，是『contentSize』這個項目打錯大小寫，就卡住了。😭</blockquote><h3>4. 打完收工（發表time）</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*tL2K_93V_eLOMwnQ-HeTMg.gif" /></figure><h3>5. 專案的 GitHub 連結</h3><p><a href="https://github.com/Daisy-1988/JULYX2">Daisy-1988/JULYX2</a></p><h3>6. 傻瓜教學連結（照著做一定會）</h3><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><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e4605064ef4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-scroll-view-7e4605064ef4">寫APP那件事．scroll view</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那件事・圖片與文字的小秘密（UILabel, UIText Field, UIImageView）]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-%E5%9C%96%E7%89%87%E8%88%87%E6%96%87%E5%AD%97%E7%9A%84%E5%B0%8F%E7%A7%98%E5%AF%86-uilabel-uitext-field-uiimageview-9f79624bebe5?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f79624bebe5</guid>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Tue, 21 Jul 2020 11:02:51 GMT</pubDate>
            <atom:updated>2020-07-27T17:02:00.710Z</atom:updated>
            <content:encoded><![CDATA[<h4>圖文並茂的大前提，你要筆記常用的小功能</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*XmqWNnErVY7aQMMsop_BOg.jpeg" /><figcaption>標籤、文字框、圖片畫面</figcaption></figure><h3>1.UILabel</h3><blockquote><strong>1-1.Line Breaks（需調整line的數字，才能分行）</strong></blockquote><blockquote><strong>Clip:於邊界處直接切除文字，如下圖：文字會被切割<br>Character Wrap:以字母為單位，邊界處字母完整，但單字不連續<br>Word Wrap:以單字為單位，若邊界處單字過長，則會移至下一行開始<br>Truncate Head:以整段為單位，省略開頭…<br>Truncate Middle:以整段為單位，省略中間…<br>Truncate Tail:以整段為單位，省略後段…</strong></blockquote><blockquote><strong>1-2.Autoshrink</strong></blockquote><blockquote><strong>Fixed Font Size:字型尺寸固定，若邊界過窄，文字被切到（不管邊界，只做自己）<br>Minimum Font Sc</strong>ale :<strong>字型</strong>縮放最小比，調整範圍0–1間，因應邊界寬窄而縮小化字體<strong>（在乎邊界，努力委屈自己）<br>Minimum Font Size:字型有自身的最小尺寸，根據邊界寬窄，有一定可改變的幅度（尊重邊界，也有自己的堅持）</strong></blockquote><blockquote><strong>1-3.Shadow<br>文字陰影，色彩自訂，移動範圍亦可調整</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*f9Q6JLoNTyeyYiZhsNImjw.jpeg" /><figcaption>範例圖示</figcaption></figure><h3>2.UIText Field</h3><p>2-1. Placeholder<br>文字框空白，未輸入文字時，內存的字符（可自行設定）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*jmNMjQuWUDA2cemeqQlqCw.jpeg" /><figcaption>提醒使用者，可輸入什麼內容</figcaption></figure><p>2–2.Border Style<br>四種模組，可挑選</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*YefN70dEC_1ymfpXWZJEZw.jpeg" /><figcaption>從無、邊框、背景皆能選擇</figcaption></figure><p>2–3.Clear Button（清除鍵）<br>四種模組（從不出現、編輯時才出現、無編輯時才出現、一直出現）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*UOvExa4F2njWnySA0mw5Hw.jpeg" /></figure><p>2–4.Min Font Size &amp; Adjust to Fit<br><strong>字型有自己原先大小（假設為Font=30），可設定字型最小值（假設為20），且要勾選Adjust to Fit（有勾才會調降），那麼隨著30逐漸調降時，字型會縮小，未滿20時，大小就為固定（無論Font多小）</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*RLPgXuphYt9jp7iWKcj-PA.jpeg" /><figcaption>同樣有設定最小值，上（無勾選）下（有勾選）</figcaption></figure><p>2–5. Content Type（預期的文字內容）<br>如：姓名、工作職稱、公司名稱….等。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*mr-blFSr1QzCGwR5bsLhZg.jpeg" /></figure><p>2–6.Capitalization（大寫）<br>如：無、單詞開頭、句子開頭、每個字母。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*xu9I686A_WqkNJ1EbRHHrQ.jpeg" /></figure><p>2–7.Keyboard Type（鍵盤樣式）<br>如：點選文字框，怎麼決定下方跳出鍵盤的樣式呢？選擇keyboard Type將會有高達12種選項，試試玩玩看吧！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*Npzkaed1QG7NNH7eMJ9dWQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*RTnKzCmmskE5aRYCXYj4NQ.jpeg" /></figure><p>2–8.Keyboard Look（鍵盤外觀）<br>雖說有三種選擇，但內設（Default）的外觀是Light，實務需調整的時間點，應是設定變成夜間模式時，鍵盤外觀也需調整成Dark。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*_TpJDgG53xloW6OpGbgyVw.jpeg" /></figure><p>2–9. Return Key（返回鍵）<br>無論你輸入了什麼，最後都由右下角決定執行的動作，共有12種選項可選擇。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*CSxXijjT8pqJf0VEFCy4OQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*txs2bifQse3i-d3MD9e8kA.jpeg" /><figcaption>左欄位（選go）； 右下角（出現對應的go）</figcaption></figure><p>2–10.Auto-enable Return Key（2–9 的附加選項）<br>為何上方的go是透明的選項呢？因為文字欄中並無輸入任何文字<br>（這就是Auto-enable Return Key的附加貼心服務呦，為了確保使用者有輸入內容）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*7ubs5rErMuWcuIzqWlgFQw.jpeg" /></figure><h3>3.UIImageView</h3><p>從左欄開始，上到下分別是UIImageView(原始長寬畫面)<br>常用選項<br>-Scale To Fill(圖案全展開於畫面內，圖案比例不固定)<br>-Aspect Fit(圖案縮放於畫面內，圖案比例固定)<br>-Aspect Fill(圖案全展開於畫面內，圖案比例固定)<br>其他則依照選項的內容而呈現圖片的部分，如：Center(呈現中央)，Top，Bottom，Left，Right，Top Left，Top Right，Bottom Left，Bottom Right。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*Hc9qimoxdv1m6Jl0ySDkWQ.jpeg" /><figcaption>Scale To Fill、Aspect Fit、Aspect Fill、<br>Centerl、Topl、Bottoml、eftl、Rightl、Top Left</figcaption></figure><p>打完收工，理解畫面中的每一個小功能，好體現『魔鬼就在細節中』這句話，真的好多眉角要知道。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f79624bebe5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-%E5%9C%96%E7%89%87%E8%88%87%E6%96%87%E5%AD%97%E7%9A%84%E5%B0%8F%E7%A7%98%E5%AF%86-uilabel-uitext-field-uiimageview-9f79624bebe5">寫APP那件事・圖片與文字的小秘密（UILabel, UIText Field, UIImageView）</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那件事．8個必懂UI 元件]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-8%E5%80%8B%E5%BF%85%E6%87%82ui-%E5%85%83%E4%BB%B6-a4c9407a5edc?source=rss-9415654fa854------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4c9407a5edc</guid>
            <dc:creator><![CDATA[Daisy]]></dc:creator>
            <pubDate>Mon, 13 Jul 2020 07:49:40 GMT</pubDate>
            <atom:updated>2020-07-27T17:01:22.510Z</atom:updated>
            <content:encoded><![CDATA[<h4>工欲善其事，必先利其器</h4><blockquote>學習新知，需了解輪廓也認識細節</blockquote><h3>APP輪廓</h3><p>對2020年的我們並不陌生，點選的次數已經大幅超過按電視遙控器了😅<br>由上至下的操作介面（時間日期最頂端，返回儲存最底端），APP就是這個時代的百科全書</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DBQCkexqqS9_E3Zc" /><figcaption>Photo by <a href="https://unsplash.com/@stereophototyp?utm_source=medium&amp;utm_medium=referral">Sara Kurfeß</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>APP細節</h3><p>就是常用、有概念、有畫面，但是具體的功能，設定，擺放位置，那可說是一問三不知，堪比最熟悉的陌生人🤣</p><h3><strong>APP UI 常用元件，列出8大必懂UI</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*_cIQaLLwI4-w3noG8Hmbmw.jpeg" /><figcaption>UI (User Interface)，使用者介面 （1–8）</figcaption></figure><ol><li>Segmented Control<br>設定：自行新增格數（最少2格）、格內可放置文字/圖形、調整顏色<br>使用：選擇性別，年齡區間、狀態等類別向度</li><li>Slider<br>設定：橫軸上的兩端可放置圖形、設定最小到最大的數值、調整顏色<br>使用：滑動選取分數、時間、溫度等數值向度</li><li>Switch<br>設定：能自訂圖示、調整顏色<br>使用：設置開關等狀態向度</li><li>Activity Indicator View<br>設定：調整顏色、大小<br>使用：活動執行中的狀態圖，常用在進行式</li><li>Progress View<br>設定：調整顏色、數值位置<br>使用：執行進度的狀態圖，常用在進行式</li><li>Visual Effect View with Blur<br>設定：內含多種模版可供選擇<br>使用：模糊背景，可凸顯關鍵主題</li><li>Page Control<br>設定：設定頁數、選擇目前頁碼、調整顏色<br>使用：分頁介紹、順序圖片、等級區分等</li><li>Date Picker<br>設定：日期、時間、日期時間、倒數<br>使用：設置時間</li></ol><p>以上介紹為個人心得分享，若有待補充處，也歡迎互相討論。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4c9407a5edc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AF%ABapp%E9%82%A3%E4%BB%B6%E4%BA%8B-8%E5%80%8B%E5%BF%85%E6%87%82ui-%E5%85%83%E4%BB%B6-a4c9407a5edc">寫APP那件事．8個必懂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>
    </channel>
</rss>