<?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 Min on Medium]]></title>
        <description><![CDATA[Stories by Min on Medium]]></description>
        <link>https://medium.com/@linmin927?source=rss-52c71139f823------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*mFqzvV909FeweCq-</url>
            <title>Stories by Min on Medium</title>
            <link>https://medium.com/@linmin927?source=rss-52c71139f823------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:35:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@linmin927/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[選擇題練習-弗里德曼ABC型人格測驗]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E9%81%B8%E6%93%87%E9%A1%8C%E7%B7%B4%E7%BF%92-%E5%BC%97%E9%87%8C%E5%BE%B7%E6%9B%BCabc%E5%9E%8B%E4%BA%BA%E6%A0%BC%E6%B8%AC%E9%A9%97-94004999dc5f?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/94004999dc5f</guid>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Fri, 22 Nov 2019 12:48:32 GMT</pubDate>
            <atom:updated>2019-11-22T12:48:32.335Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*cXlyHUnzjaJuyPwLqCaGNw.gif" /></figure><p>偷懶的選擇題練習</p><p>只有用到兩個頁面</p><p>使用功能有</p><p>自訂controller、新增一個swift file儲存問題、陣列儲存、if else 應用、分數＆題數計算、自訂function、outlet collections應用、IBaction&amp;outlet…</p><p>程式碼如下</p><pre><strong>import</strong> UIKit</pre><pre><strong>class</strong> QuesViewController: UIViewController {</pre><pre><strong>let</strong> questions = [Qusetinonlist(question: &quot;在工作中你非常的賣力，希望得到領導的認可，並且希望得到晉升。&quot;, choice: [&quot;是的&quot;,&quot;還可以&quot;,&quot;不是&quot;],imageName: &quot;&quot;),Qusetinonlist(question: &quot;下面圖片給你什麼樣的感覺？&quot;, choice: [&quot;眼花繚亂、心慌&quot;,&quot;溫馨、安詳&quot;,&quot;冷清、落寞&quot;],imageName: &quot;q2&quot;),Qusetinonlist(question: &quot;下面圖片你看到了什麼？&quot;, choice: [&quot;兩個老頭在吵架&quot;,&quot;兩個人在傳功&quot;,&quot;跳芭蕾的女孩&quot;],imageName: &quot;q3&quot;),Qusetinonlist(question: &quot;下面圖片將要發生什麼？&quot;, choice: [&quot;老頭要殺躺在床上的人&quot;,&quot;老頭要給他蓋被子&quot;,&quot;老頭是醫生，正在給病人催眠&quot;],imageName: &quot;q4&quot;),Qusetinonlist(question: &quot;當你的朋友誤解你並且跟你吵架後，你會怎麼做？&quot;, choice: [&quot;絕交&quot;,&quot;解釋&quot;,&quot;忍著&quot;],imageName: &quot;&quot;)]</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> questinonLabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>var</strong> choiceButton: [UIButton]!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> image: UIImageView!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> sumLabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> lastanwerLabel: UILabel!</pre><pre><strong>var</strong> index = 0</pre><pre><strong>var</strong> score0 = 0</pre><pre><strong>var</strong> score1 = 0</pre><pre><strong>var</strong> score2 = 0</pre><pre><strong>var</strong> sum = 0</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>//畫面載入顯示第一題</pre><pre>sumLabel.isHidden = <strong>true</strong></pre><pre>lastanwerLabel.isHidden = <strong>true</strong></pre><pre>questinonLabel.text = questions[0].question</pre><pre>image.image = UIImage(named: questions[0].imageName)</pre><pre>choiceButton[0].setTitle(questions[0].choice[0], for: .normal)</pre><pre>choiceButton[1].setTitle(questions[0].choice[1], for: .normal)</pre><pre>choiceButton[2].setTitle(questions[0].choice[2], for: .normal)</pre><pre>}</pre><pre>//選擇哪個</pre><pre><strong>@IBAction</strong> <strong>func</strong> ButtonPress(<strong>_</strong> sender: UIButton) {</pre><pre><strong>if</strong> sender.tag == 0{</pre><pre>next()</pre><pre><strong>if</strong> sender.tag == 0{</pre><pre>score0 = score0 + 1</pre><pre>}</pre><pre><strong>if</strong> sender.tag == 1{</pre><pre>score1 = score1 + 2</pre><pre>}</pre><pre><strong>if</strong> sender.tag == 2{</pre><pre>score2 = score2 + 3</pre><pre>}</pre><pre>sum = 1 + score0 + score1 + score2</pre><pre>}<strong>else</strong> <strong>if</strong> sender.tag == 1{</pre><pre>next()</pre><pre><strong>if</strong> sender.tag == 0{</pre><pre>score0 = score0 + 1</pre><pre>}</pre><pre><strong>if</strong> sender.tag == 1{</pre><pre>score1 = score1 + 2</pre><pre>}</pre><pre><strong>if</strong> sender.tag == 2{</pre><pre>score2 = score2 + 3</pre><pre>}</pre><pre>sum = 2 + score0 + score1 + score2</pre><pre>}<strong>else</strong> <strong>if</strong> sender.tag == 2{</pre><pre>next()</pre><pre><strong>if</strong> sender.tag == 0{</pre><pre>score0 = score0 + 1</pre><pre>}</pre><pre><strong>if</strong> sender.tag == 1{</pre><pre>score1 = score1 + 2</pre><pre>}</pre><pre><strong>if</strong> sender.tag == 2{</pre><pre>score2 = score2 + 3</pre><pre>}</pre><pre>sum = 3 + score0 + score1 + score2</pre><pre>}</pre><pre>}</pre><pre>//下一題</pre><pre><strong>func</strong> next(){</pre><pre><strong>if</strong> index &lt; questions.count - 1{</pre><pre>index = index + 1</pre><pre>sumLabel.isHidden = <strong>true</strong></pre><pre>lastanwerLabel.isHidden = <strong>true</strong></pre><pre>questinonLabel.text = questions[index].question</pre><pre>image.image = UIImage(named: questions[index].imageName)</pre><pre>choiceButton[0].setTitle(questions[index].choice[0], for: .normal)</pre><pre>choiceButton[1].setTitle(questions[index].choice[1], for: .normal)</pre><pre>choiceButton[2].setTitle(questions[index].choice[2], for: .normal)</pre><pre>}<strong>else</strong>{</pre><pre>questinonLabel.isHidden = <strong>true</strong></pre><pre>choiceButton[0].isHidden = <strong>true</strong></pre><pre>choiceButton[1].isHidden = <strong>true</strong></pre><pre>choiceButton[2].isHidden = <strong>true</strong></pre><pre>image.isHidden = <strong>true</strong></pre><pre>sumLabel.isHidden = <strong>false</strong></pre><pre>lastanwerLabel.isHidden = <strong>false</strong></pre><pre>sumLabel.text = &quot;你的總分為\(sum)&quot;</pre><pre><strong>if</strong> sum &gt; 4 , sum &lt; 10{</pre><pre>lastanwerLabel.text = &quot;A型人格：你的性格比較急躁並且缺乏一定的耐性，工作上面有著非常強的上進心，能吃苦肯做事，有不小的野心，希望取得較高的成就。平時對於時間的安排較為緊張，因此生活中也總是處在緊張的狀態，對於社會的適應能力薄弱，屬於不安定型的人格。你有點類似血色浪漫里的鐘躍民，是那種永遠走在路上的人！&quot;</pre><pre>}<strong>else</strong> <strong>if</strong> sum &gt; 9,sum &lt; 13{</pre><pre>lastanwerLabel.text = &quot;B型人格：你的性格不溫不火，言談行為舉止都比較得當，對於工作和生活有著較強的滿足感，比較喜歡慢節奏的生活，做事情不緊不慢，慢條斯理的。情緒的活動強度較小，具有很好的穩定性和持久力，不容易激動，情緒平穩，有著大將風範，泰山崩於前而色不變，麋鹿行與左而目不瞬。&quot;</pre><pre>}<strong>else</strong> <strong>if</strong> sum &gt; 12,sum &lt; 16{</pre><pre>lastanwerLabel.text = &quot;C型人格：你的性格有意的克制和壓抑，對於負面的情緒保持著深深的壓抑，特別是對於憤怒的壓抑，因此你常常生悶氣，儘量迴避各種衝突，常常會原諒一些本來不值得原諒的事情，對別人有著一種過分的寬容，忍讓和耐心，往往屈從於權威，缺乏個人主見，時常會有孤獨感和失助感。&quot;</pre><pre>}</pre><pre>}</pre><pre>}</pre><pre>}</pre><p>過程中有卡關</p><p>就是畫面載入的第一題</p><p>分數沒辦法加總</p><p>嘗試了許多方法後</p><p>最後選擇一個最笨的法子ＸＤ</p><p>就是在按鈕function底下多寫幾個if判斷</p><p>說真的現在叫我從無到有直接生一個程式碼出來真的有點困難</p><p>每個星期六走出教室馬上就忘了50%了…😭😭😭😭</p><p>只能一邊寫作業一邊翻投影片一邊抄襲同學作品？</p><p>感覺還是要多寫幾次才會上手</p><p>一萬個小時我才走了幾分鐘😫</p><p>俗話說抄襲為成功之母</p><p>所以….</p><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%E6%95%99%E5%AE%A4/%E4%BD%9C%E6%A5%AD-6-10-%E5%BF%83%E7%90%86%E6%B8%AC%E9%A9%97%E4%B9%8B%E6%8B%9B%E6%90%96%E6%92%9E%E9%A8%99app%E7%AC%AC%E4%BA%8C%E5%BD%88-e8c3926e4c96">作業#6.10 — 心理測驗之招搖撞騙APP第二彈</a></p><p>此次作業的Github</p><p><a href="https://github.com/linmin927/Psychological-test">linmin927/Psychological-test</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94004999dc5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E9%81%B8%E6%93%87%E9%A1%8C%E7%B7%B4%E7%BF%92-%E5%BC%97%E9%87%8C%E5%BE%B7%E6%9B%BCabc%E5%9E%8B%E4%BA%BA%E6%A0%BC%E6%B8%AC%E9%A9%97-94004999dc5f">選擇題練習-弗里德曼ABC型人格測驗</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[問答題練習]]></title>
            <link>https://medium.com/@linmin927/%E5%95%8F%E7%AD%94%E9%A1%8C%E7%B7%B4%E7%BF%92-28be9d42e0c7?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/28be9d42e0c7</guid>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Sat, 14 Sep 2019 10:42:58 GMT</pubDate>
            <atom:updated>2019-09-14T10:42:58.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*2ezszKbj98sUvsPoYa46Pg.gif" /></figure><p>創建一個Swift File檔案</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gkJd89mJot6pxHH5FnfV2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qv1Pt50TVix2eRvej6mBJQ.png" /></figure><p>在檔案內新增一個類別Question</p><p>宣告兩個變數</p><p>description問題、answers答案，使其為空字串</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLRgapUX4AAmawFfwOeujQ.png" /></figure><p>由於有多個問題</p><p>所以利用</p><pre><strong>var</strong> questions = [Question]()</pre><p>宣告一個陣列</p><p>接著在viewDidLoad裡輸入問題及答案</p><pre><strong>class</strong> ViewController: UIViewController {</pre><pre><strong>var</strong> questions = [Question]()</pre><pre><strong>var</strong> index = 0</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> countLabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> questionLabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> answerLabel: UILabel!</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>// Do any additional setup after loading the view.</pre><pre><strong>let</strong> qusetion1 = Question()</pre><pre>qusetion1.description = &quot;中秋節必做&quot;</pre><pre>qusetion1.answer = &quot;烤肉&quot;</pre><pre>questions.append(qusetion1)</pre><pre><strong>let</strong> qusetion2 = Question()</pre><pre>qusetion2.description = &quot;台中最好吃燒烤&quot;</pre><pre>qusetion2.answer = &quot;屋馬&quot;</pre><pre>questions.append(qusetion2)</pre><pre><strong>let</strong> qusetion3 = Question()</pre><pre>qusetion3.description = &quot;要帶什麼去吃屋馬才不會留下來洗碗&quot;</pre><pre>qusetion3.answer = &quot;魔法小卡&quot;</pre><pre>questions.append(qusetion3)</pre><pre><strong>let</strong> qusetion4 = Question()</pre><pre>qusetion4.description = &quot;中秋小朋友最愛吃什麼餅&quot;</pre><pre>qusetion4.answer = &quot;元祖雪餅，笨蛋才說月餅～&quot;</pre><pre>questions.append(qusetion4)</pre><pre><strong>let</strong> qusetion5 = Question()</pre><pre>qusetion5.description = &quot;中秋節除了烤肉還可以？&quot;</pre><pre>qusetion5.answer = &quot;放煙火&quot;</pre><pre>questions.append(qusetion5)</pre><pre><strong>let</strong> qusetion6 = Question()</pre><pre>qusetion6.description = &quot;你知道網路上台中最有名的特產？&quot;</pre><pre>qusetion6.answer = &quot;慶記&quot;</pre><pre>questions.append(qusetion6)</pre><pre><strong>let</strong> qusetion7 = Question()</pre><pre>qusetion7.description = &quot;哪間店的珍奶最好喝&quot;</pre><pre>qusetion7.answer = &quot;春水堂&quot;</pre><pre>questions.append(qusetion7)</pre><pre><strong>let</strong> qusetion8 = Question()</pre><pre>qusetion8.description = &quot;台中人最愛說的四個字&quot;</pre><pre>qusetion8.answer = &quot;真的假的&quot;</pre><pre>questions.append(qusetion8)</pre><pre><strong>let</strong> qusetion9 = Question()</pre><pre>qusetion9.description = &quot;遇見誰是你的小幸運&quot;</pre><pre>qusetion9.answer = &quot;彼得潘&quot;</pre><pre>questions.append(qusetion9)</pre><pre><strong>let</strong> qusetion10 = Question()</pre><pre>qusetion10.description = &quot;如果可以再次選擇？&quot;</pre><pre>qusetion10.answer = &quot;還是彼得潘&quot;</pre><pre>questions.append(qusetion10)</pre><pre>questionLabel.text = questions[0].description</pre><pre>answerLabel.text = &quot;&quot;</pre><pre>countLabel.text = &quot;\(index+1)&quot;</pre><pre>}</pre><p>使用if 判斷 題數是否與陣列問題數相同</p><p>若相同則返回第一題</p><p>加入countLabel 用來計數 顯示該題為第幾題</p><pre><strong>@IBAction</strong> <strong>func</strong> next(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre>index = index + 1</pre><pre><strong>if</strong> index == questions.count{</pre><pre>index = 0</pre><pre>}</pre><pre><strong>if</strong> index &lt; questions.count {</pre><pre>questionLabel.text = questions[index].description</pre><pre>answerLabel.text = &quot;&quot;</pre><pre>countLabel.text = &quot;\(index+1)&quot;</pre><pre>}</pre><p>github</p><p><a href="https://github.com/linmin927/Qna">linmin927/Qna</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28be9d42e0c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[調色大師 — 我不要黑心史奴比]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E8%AA%BF%E8%89%B2%E5%A4%A7%E5%B8%AB-%E6%88%91%E4%B8%8D%E8%A6%81%E9%BB%91%E5%BF%83%E5%8F%B2%E5%A5%B4%E6%AF%94-1eaceafc6d7?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/1eaceafc6d7</guid>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Sat, 17 Aug 2019 13:26:14 GMT</pubDate>
            <atom:updated>2019-08-17T13:37:11.751Z</atom:updated>
            <content:encoded><![CDATA[<h3>調色大師 — 我不要黑心史奴比</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*zixfFt3rldCg1idyyZlNHw.gif" /></figure><p>最近莫名的喜歡史奴比</p><p>還上了蝦皮買了一堆史奴比手機殼😂</p><p>所以這次作業就決定是你了</p><p>利用之前課堂上教的，做了一張去背的史奴比圖</p><p>使用元件</p><p>Slider,Switch,Label,imageView</p><p>使用技巧</p><p>IBOulet,IBAction,CAGradientLayer 製作漸層,Random隨機配色,if/else判斷</p><p>做一個基本的Slider調色很簡單</p><p>但當你加了一堆有的沒的</p><p>隨機配色、漸層、背景圖啊…</p><p>再加上一堆 if 判斷 switch開關就會搞得很混亂</p><p>其實這隻app還有一些小bug，正在努力把他抓出來除掉😅</p><p>（謎之音：可以做一個重置的按鈕出來啊笨蛋）</p><p>程式碼如下</p><pre><strong>import</strong> UIKit</pre><pre><strong>class</strong> ViewController: UIViewController {</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> snoopy: UIImageView!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> sky: UIImageView!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> redcolor: UISlider!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> greencolor: UISlider!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> bluecolor: UISlider!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> alpha: UISlider!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> redlabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> greenlabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> bluelanel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> alphalabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> RedSwitch: UISwitch!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> GreenSwitch: UISwitch!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> BlueSwitch: UISwitch!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> RandomColor: UIButton!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> graydientview: UIImageView!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> graySwitch: UISwitch!</pre><pre>//上面是變數--outlet</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>// Do any additional setup after loading the view.</pre><pre>}</pre><pre>//下面是功能--action</pre><pre>//Slider滑動調整顏色&amp;Label顯示目前數值</pre><pre><strong>@IBAction</strong> <strong>func</strong> coloradjust(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre>snoopy.backgroundColor = UIColor(red: CGFloat(redcolor.value), green: CGFloat(greencolor.value), blue: CGFloat(bluecolor.value), alpha: CGFloat(alpha.value))</pre><pre>//label顯示slider的值，&quot;％.2f&quot;為小數點後兩位</pre><pre>redlabel.text=String(format: &quot;%.2f&quot;,redcolor.value)</pre><pre>greenlabel.text=String(format:&quot;%.2f&quot;,greencolor.value)</pre><pre>bluelanel.text=String(format:&quot;%.2f&quot;,bluecolor.value)</pre><pre>alphalabel.text=String(format:&quot;%.2f&quot;,alpha.value)</pre><pre>}</pre><pre>//Switch開關控制</pre><pre><strong>@IBAction</strong> <strong>func</strong> SwitchColor(<strong>_</strong> sender: UISwitch) {</pre><pre>//如果紅綠藍其中一個Switch打開，則亂數按鈕不能按</pre><pre><strong>if</strong> RedSwitch.isOn || GreenSwitch.isOn || BlueSwitch.isOn{</pre><pre>RandomColor.isEnabled=<strong>false</strong></pre><pre>//如果Switch打開，則Slider不能滑動</pre><pre><strong>if</strong> RedSwitch.isOn{</pre><pre>redcolor.isEnabled=<strong>false</strong></pre><pre>}<strong>else</strong>{</pre><pre>redcolor.isEnabled=<strong>true</strong></pre><pre>}</pre><pre><strong>if</strong> GreenSwitch.isOn{</pre><pre>greencolor.isEnabled=<strong>false</strong></pre><pre>}<strong>else</strong>{</pre><pre>greencolor.isEnabled=<strong>true</strong></pre><pre>}</pre><pre><strong>if</strong> BlueSwitch.isOn{</pre><pre>bluecolor.isEnabled=<strong>false</strong></pre><pre>}<strong>else</strong>{</pre><pre>bluecolor.isEnabled=<strong>true</strong></pre><pre>}</pre><pre>}<strong>else</strong>{</pre><pre>RandomColor.isEnabled=<strong>true</strong></pre><pre>}</pre><pre>}</pre><pre>//RandomColor 亂數產生顏色</pre><pre><strong>@IBAction</strong> <strong>func</strong> Random(<strong>_</strong> sender: UIButton) {</pre><pre><strong>let</strong> red = Double.random(in: 0...1)</pre><pre><strong>let</strong> green = Double.random(in: 0...1)</pre><pre><strong>let</strong> blue = Double.random(in: 0...1)</pre><pre><strong>let</strong> alpha = 1</pre><pre>snoopy.backgroundColor=UIColor(red: CGFloat(red), green: CGFloat(green), blue: CGFloat(blue), alpha: CGFloat(alpha))</pre><pre>redlabel.text=String(format: &quot;%.2f&quot;,red)</pre><pre>greenlabel.text=String(format: &quot;%.2f&quot;,green)</pre><pre>bluelanel.text=String(format: &quot;%.2f&quot;,blue)</pre><pre>alphalabel.text=String(alpha)</pre><pre>redcolor.value = Float(red)</pre><pre>greencolor.value = Float(green)</pre><pre>bluecolor.value = Float(blue)</pre><pre>}</pre><pre>//漸層開關</pre><pre><strong>@IBAction</strong> <strong>func</strong> graydientSwitch(<strong>_</strong> sender: UISwitch) {</pre><pre><strong>let</strong> Layer = CAGradientLayer()</pre><pre><strong>if</strong> graySwitch.isOn{</pre><pre>redcolor.isEnabled=<strong>false</strong></pre><pre>greencolor.isEnabled=<strong>false</strong></pre><pre>bluecolor.isEnabled=<strong>false</strong></pre><pre>alpha.isEnabled=<strong>false</strong></pre><pre>RandomColor.isEnabled=<strong>false</strong></pre><pre>snoopy.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0)</pre><pre>sky.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0)</pre><pre>Layer.frame = graydientview.bounds</pre><pre>Layer.colors = [UIColor.orange.cgColor, UIColor.blue.cgColor]</pre><pre>Layer.startPoint = CGPoint(x: 0, y: 0)</pre><pre>Layer.endPoint = CGPoint(x: 1, y: 1)</pre><pre>graydientview.layer.addSublayer(Layer)</pre><pre>}</pre><pre><strong>else</strong>{</pre><pre>redcolor.isEnabled=<strong>true</strong></pre><pre>greencolor.isEnabled=<strong>true</strong></pre><pre>bluecolor.isEnabled=<strong>true</strong></pre><pre>alpha.isEnabled=<strong>true</strong></pre><pre>RandomColor.isEnabled=<strong>true</strong></pre><pre>snoopy.backgroundColor = UIColor(red: CGFloat(redcolor.value), green: CGFloat(greencolor.value), blue: CGFloat(bluecolor.value), alpha: CGFloat(alpha.value))</pre><pre>//label顯示slider的值，&quot;％.2f&quot;為小數點後兩位</pre><pre>redlabel.text=String(format: &quot;%.2f&quot;,redcolor.value)</pre><pre>greenlabel.text=String(format:&quot;%.2f&quot;,greencolor.value)</pre><pre>bluelanel.text=String(format:&quot;%.2f&quot;,bluecolor.value)</pre><pre>alphalabel.text=String(format:&quot;%.2f&quot;,alpha.value)</pre><pre>Layer.frame = graydientview.bounds</pre><pre>Layer.colors = [UIColor(displayP3Red: 0, green: 0, blue: 0, alpha: 0).cgColor,UIColor(displayP3Red: 0, green: 0, blue: 0, alpha: 0).cgColor]</pre><pre>graydientview.layer.addSublayer(Layer)</pre><pre>}</pre><pre>}</pre><pre>}</pre><p>參考文章如下～</p><ul><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%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8-uiview-%E7%9A%84-mask-%E8%A3%BD%E4%BD%9C%E6%BC%B8%E5%B1%A4%E7%9A%84%E5%9C%96%E7%89%87%E5%92%8C%E6%96%87%E5%AD%97-2130cd4f3f53">利用 UIView 的 mask 為圖片文字染上美麗的漸層</a></li><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/%E8%AA%BF%E8%89%B2%E5%A4%A7%E5%B8%AB-swift-ios-app-%E4%BD%9C%E6%A5%AD-a8ab4d968034">#13 調色大師</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%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8-cagradientlayer-%E8%A3%BD%E4%BD%9C%E6%BC%B8%E5%B1%A4-e86cee69f3a0">利用 CAGradientLayer 製作漸層</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/study-8-2-%E8%AA%BF%E8%89%B2%E5%A4%A7%E5%B8%AB-%E8%81%96%E8%AA%95%E7%BE%8E%E7%94%B2%E9%81%B8%E8%89%B2-9cab0efddc8a">[study#8-2] 調色大師-聖誕美甲選色</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/13-%E8%8E%AB%E8%8E%89-fe47c67e8631">#13 莫莉</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/15-%E7%B6%AD%E5%B0%BC%E7%A9%BF%E8%8A%B1%E8%A5%AF%E8%A1%AB%E4%B9%9F%E5%A5%BD%E7%9C%8B-fa55f5b39e7a">#13 調色大師：維尼穿花襯衫也好看</a></li></ul><p>Github</p><p><a href="https://github.com/linmin927/snoopy_color">linmin927/snoopy_color</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1eaceafc6d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E8%AA%BF%E8%89%B2%E5%A4%A7%E5%B8%AB-%E6%88%91%E4%B8%8D%E8%A6%81%E9%BB%91%E5%BF%83%E5%8F%B2%E5%A5%B4%E6%AF%94-1eaceafc6d7">調色大師 — 我不要黑心史奴比</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[從程式製作國旗圖案-法國國旗]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%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-%E6%B3%95%E5%9C%8B%E5%9C%8B%E6%97%97-ab2a4baaf7b3?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab2a4baaf7b3</guid>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Fri, 02 Aug 2019 13:07:01 GMT</pubDate>
            <atom:updated>2019-08-02T14:03:07.924Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dRbPoQCM6kT3DKIRO2GlFg.png" /></figure><p>這次作業選擇了</p><p>象徵著自由、平等、博愛的法國國旗</p><p>因為他比較簡單（很誠實😂）</p><p>廢話不多說 以下是程式碼</p><p><strong>import</strong> UIKit</p><p><strong>import</strong> PlaygroundSupport</p><p>//建立矩形</p><p><strong>var</strong> rect = CGRect(x: 0, y: 0, width: 600, height: 300)</p><p>//建立藍色view</p><p><strong>let</strong> blueView = UIView(frame: rect)</p><p>blueView.backgroundColor = UIColor(red: 0, green: 0, blue: 1, alpha: 1)</p><p>//建立白色view</p><p>rect = CGRect(x: 200, y: 0, width: 200, height: 300)</p><p><strong>let</strong> whiteview = UIView(frame: rect)</p><p>whiteview.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)</p><p>//藍色view加入一個白色view</p><p>blueView.addSubview(whiteview)</p><p>//建立紅色view</p><p>rect = CGRect(x: 400, y: 0, width: 200, height: 300)</p><p><strong>let</strong> redview = UIView(frame: rect)</p><p>redview.backgroundColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1)</p><p>//藍色view加入一個紅色view</p><p>blueView.addSubview(redview)</p><p>//Playground liveview</p><p>PlaygroundPage.current.liveView = blueView</p><p>簡單來說 就是 全部摻在一起 做成法國國旗～</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*edLbOsUdA8t6oo6uRV9kvg.png" /></figure><p>參考資料</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/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-b3a1a913fe2e">#43 從程式製作國旗圖案</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%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8-uiview-%E7%9A%84-addsubview-%E5%B0%87-view-%E5%8A%A0%E5%88%B0%E5%8F%A6%E4%B8%80%E5%80%8B-view-%E4%B8%8A-8b20c91d5b7c">利用 UIView 的 addSubview 將 view 加到另一個 view 上</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab2a4baaf7b3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%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-%E6%B3%95%E5%9C%8B%E5%9C%8B%E6%97%97-ab2a4baaf7b3">從程式製作國旗圖案-法國國旗</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[用 Swift 打造跳舞機器人 BoogieBot]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E7%94%A8-swift-%E6%89%93%E9%80%A0%E8%B7%B3%E8%88%9E%E6%A9%9F%E5%99%A8%E4%BA%BA-boogiebot-8a1c6db27c68?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a1c6db27c68</guid>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Mon, 29 Jul 2019 13:55:36 GMT</pubDate>
            <atom:updated>2019-07-29T16:18:03.056Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*5K2UKvziCdLo1OQ50OKfFg.gif" /></figure><p>蠻新鮮的一個作業，可以利用別人寫好的function，來控制機器人跳舞</p><p>實作</p><p>一、下載電子書</p><p><a href="https://books.apple.com/us/book/intro-to-app-development-with-swift/id1118575552?source=post_page---------------------------">‎Intro to App Development with Swift</a></p><p>二、打開電子書第5頁點選Download Xcode 10 project file下載範例，接著開啟第7項BoogieBot</p><p>三、執行Xcode後按next到page10，首先右上角設定live view如圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*0Xks6CbVZsraune5rRlDSw.png" /></figure><p>可將輸入的function機器人動作即時顯示在旁邊</p><p>四、開始製作屬於自己的機器人舞</p><p>手臂 — leftArmUp(), leftArmDown(), rightArmUp(), rightArmDown()</p><p>腿 — leftLegUp(), leftLegDown(), rightLegUp(), rightLegDown()</p><p>搖屁股 — shakeItLeft(), shakeItRight(), shakeItCenter()</p><p>跳 — jumpUp(), jumpDown()</p><p>變色 — fabulize(), defabulize()</p><p>設定標題和副標題 — setBotTitle(“My Awesome Dance”), setBotSubtitle(“By The Boogiemaster”)</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/%E7%94%A8-swift-%E6%89%93%E9%80%A0%E8%B7%B3%E8%88%9E%E6%A9%9F%E5%99%A8%E4%BA%BA-boogiebot-199d07d9bb95">用 Swift 打造跳舞機器人 BoogieBot</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a1c6db27c68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%94%A8-swift-%E6%89%93%E9%80%A0%E8%B7%B3%E8%88%9E%E6%A9%9F%E5%99%A8%E4%BA%BA-boogiebot-8a1c6db27c68">用 Swift 打造跳舞機器人 BoogieBot</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[StoryBoard 星座電子書 APP]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/storyboard-%E6%98%9F%E5%BA%A7%E9%9B%BB%E5%AD%90%E6%9B%B8-app-3875be9226b4?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/3875be9226b4</guid>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Mon, 22 Jul 2019 17:09:27 GMT</pubDate>
            <atom:updated>2019-07-23T03:09:33.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*RdLH0v4a5ZHMULAuuCbwFw.jpeg" /></figure><p>在經歷過幾天的加班疲勞轟炸後，終於有時間來做作業了</p><p>利用了唯一的一天假期把這個APP生了出來</p><p>不過開始的時候一度腦袋空空…還好有孤狗小姐可以問，而且真的是到處都可以連到小王子的Medium，有神快拜！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*_dSPL7hp1txLOA-QcIwinw.jpeg" /></figure><p>這次選擇的主題是星座</p><p>內容物有各星座故事、2019下半年運勢、準到不行的性格分析，還有一些帥哥美女圖😂</p><p>使用了以下功能</p><ol><li>搭配 tab bar controller &amp; navigation controller。</li><li>使用 table view controller with static cells。</li><li>使用 segue 串接頁面。</li><li>設定 App Icon ，名稱和 App 的開頭畫面(LaunchScreen.storyboard)。</li><li>使用到 iOS SDK 的各種 UI 元件，比方 view，button，label，image view，text view，table view，scroll view。</li><li>使用到 text view，可點選文字連結顯示網頁。</li></ol><p>7. 使用 SF Symbols。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*WraTkdpQpLb8o3_JFURC8g.gif" /></figure><p>很慶幸自己過了四天還記得八成</p><p>不過在開始的第一關背景圖就卡關了😓</p><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/%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><p>主要花比較久時間的是找資料跟排版</p><p>雖然StoryBoard很方便</p><p>可以不用寫一行程式就製作出電子書app</p><p>但還是有缺點</p><p>就是越多的畫面會導致電腦變得很LAG</p><p>到後面連拉個segue都要等5秒🙄</p><p>第二個遇到問題的是scroll view</p><p>上課的時候看得很簡單</p><p>但等到自己實際操作的時候…</p><p>只記得一半哈哈</p><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%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><p>其實我喜歡的歌手是田馥甄還有梁靜茹</p><p>只是上課的時候不知道為什麼順口就講了老蕭（也許是剛看完他的廢片吧🤣）</p><p>小王子可能覺得為什麼我沒有講戴佩妮🤣</p><p>接著就是漫長的排版…直到最後一關text view</p><p>這關卡得有點莫名其妙</p><p>不知道是Xcode本身的Bug還是怎樣</p><p>元件拉出來打的字都是空白的改文字顏色也沒用</p><p>甚至增加了第二個table cell卻顯示在第一個cell的位置…（兩個cell重疊）</p><p>搞得我跟估狗小姐滿腦問號</p><p>最後只好像個瞎子一樣，邊執行邊拉元件才搞定＝ ＝</p><p>還有蠻多UI元件可以用，等之後再來摸索😂</p><p>Github連結</p><p><a href="https://github.com/linmin927/Constellations">linmin927/Constellations</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3875be9226b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/storyboard-%E6%98%9F%E5%BA%A7%E9%9B%BB%E5%AD%90%E6%9B%B8-app-3875be9226b4">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[第一次親密接觸 — 自我介紹]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E7%AC%AC%E4%B8%80%E6%AC%A1%E8%A6%AA%E5%AF%86%E6%8E%A5%E8%A7%B8-%E8%87%AA%E6%88%91%E4%BB%8B%E7%B4%B9-ab5e5600477a?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab5e5600477a</guid>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Fri, 12 Jul 2019 15:49:11 GMT</pubDate>
            <atom:updated>2019-07-12T15:53:25.661Z</atom:updated>
            <content:encoded><![CDATA[<h3>第一次親密接觸 — 自我介紹</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*f2casHz2Obs_y4Izrh-G4w.jpeg" /></figure><p>開始廢話之前 先來張假掰的照片</p><p>現在想想自從高中時期的無名小站後，好像很久沒有打網誌了…</p><p>還記得兩個月前在網路上找了一堆轉職資訊</p><p>滑了無數個頁面的我，突然停留在一個頁面</p><p>那就是彼得潘的「文組生的iOS App 程式設計入門」</p><p>不知道為什麼這個頁面深深吸引著我</p><p>其中最印象深刻的一句話就是</p><p>「資工系也是有不會寫程式的」</p><p>我是一個假資工系畢業生，雖然大學唸了四年但是一點基礎都沒有…每個學期都是學不一樣的程式語言，幾乎都在沾醬油…再加上那些密密麻麻的程式碼導致我對寫程式這件事情開始興趣缺缺</p><p>上課時班上總是有大部分人很認真得敲鍵盤，不過敲得不是程式碼，而是曾經很紅的Tetris Battle，不知不覺自己也開始陷入了，於是就開始了耍廢的大學生活…慶幸的是大三那年遇到一位大刀，一次砍了我三科，砍得我差點就包袱款款爬回家😱。大四那年強迫自己重修了三科學分，救了一點JAVA還有SQL SERVER回來，然後自己搞了一個小專題，順利得畢業了（差點延畢）😓也由於大學讀得是私立大學，所以一畢業就開始負債人生…</p><p>畢業後進入的是時薪八塊半的國軍online，完全不想回憶的錄影帶生活，每天就是重複重複再重複</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*SEOsdwVfrDWKBX495OBkmA.png" /></figure><p>登出國軍online後，藉著自己大四那年救回的一點JAVA還有SQL語言找了一間小公司練等級，不過當時台中軟體薪資真的是只有一個「慘」字能形容…責任制每天早8晚9一個月只有25k，就這樣打怪打了三個月，身上的金幣連買杯奶茶補血都有難度，這促使我第一次思考人生，然後在某個因緣際會下，親戚建議我到半導體廠工作，說是一個月至少40k，當下的我毫不猶豫馬上辭職轉往半導體產業發展。</p><p>就這樣默默的工作了五年，學貸清了、還買了台新車，也存了一點資產，不過在公司的我卻時常在思考人生，原來網路上講的「進無塵室就會開始思考人生」都是真的，雖然半導體產業的薪資比起外面稍微多一些，但每天都過得很無趣，開不完的會、打不完的報告、處理不完的異常、跟聽到很煩的主管幹話，每天都在上演一樣的劇情…</p><p>未來許多產業將被AI取代，某些半導體業已經開始搞自動化，內地近期也開始積極設廠，再加上最近川普哥打貿易戰打得公司措手不及，也讓我更加認真思考自己未來的定位</p><p>又是在某個因緣際會下，看到了彼得潘的「文組生的iOS App 程式設計入門」，讓我很感興趣，於是就開始在彼得潘的Ｍedium點來點去，看到最有感覺得一句話就是「當你努力想學習 Swift 時，全世界都會來幫你」，這也開啟了我想轉職回本科的念頭，在網路上查了些資料，發現Swift比起以往的JAVA或是C語言還要容易學習，也由於它不像舊有語言一樣都是密密麻麻的程式碼，提高了我想學習的興趣</p><p>最終我出發了，往IOS魔法師的道路前進💪</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_kRItdTUDQPxpo_rHMwDDQ.png" /></figure><p>如果我會寫程式，我就能成為厲害的工程師。<br>我有認真學習程式嗎?沒有。<br>所以，很可惜，我只能到半導體業打雜。</p><p>如果我有花不完的摳摳，我就能成為環遊世界的旅行家。<br>我有多到數不盡的摳摳嗎？沒有。<br>所以，很遺憾，我只能每年出國一次過過癮。</p><p>如果我會寫Swift，那我就能創作出APP<br>每天都可以持續學習嗎? 可以。<br>所以，是的，我相信努力就會有收穫，我一定可以成為IOS魔法師。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab5e5600477a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%AC%AC%E4%B8%80%E6%AC%A1%E8%A6%AA%E5%AF%86%E6%8E%A5%E8%A7%B8-%E8%87%AA%E6%88%91%E4%BB%8B%E7%B4%B9-ab5e5600477a">第一次親密接觸 — 自我介紹</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[模擬器實作Gif & GitHub上傳]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E6%A8%A1%E6%93%AC%E5%99%A8%E5%AF%A6%E4%BD%9Cgif-github%E4%B8%8A%E5%82%B3-7cee9c21a5df?source=rss-52c71139f823------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cee9c21a5df</guid>
            <dc:creator><![CDATA[Min]]></dc:creator>
            <pubDate>Fri, 12 Jul 2019 06:33:20 GMT</pubDate>
            <atom:updated>2019-07-12T06:44:53.036Z</atom:updated>
            <content:encoded><![CDATA[<p>一、實作Gif</p><p>昨天下班後終於有時間來研究作業～</p><p>結果不小心忘我玩到凌晨兩點，還吵了某位大神哈😂</p><p>利用了第一堂課學到的一些小技巧，又重新做了個簡單的ＡＰＰ</p><ol><li>App icon — 這應該算是App的門面，美的圖案讓你荷包賺滿滿，醜的圖案讓你檢舉接不完（誤</li></ol><p>製作icon有兩種方法</p><p>一個是上網找圖然後使用mac內建的螢幕截圖，然後！＠＃％＾＆＊（當時顧著敲鍵盤所以忘記截圖後怎麼調整圖片大小了哈哈😂），在調整成所需大小</p><p>另一個是使用<a href="https://makeappicon.com/">https://makeappicon.com</a></p><p>這個網址非常簡單好用，只要把圖片丟進烤吐司機，耐心等待幾分鐘後就會跳出許多不同大小的吐司</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-0pUpInUFA4cD5imk0d4A.png" /></figure><p>接著下載所需大小的icon再把它拉到 Xcode專案內的asssets…appicon即可</p><p>2. View controller ＆Segue ＆button,label — 建立多個view頁面加入按鈕、文字等再以Segue連接頁面（使用右鍵拉線）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*7iXFMG77RVhiF3DsredaCw.png" /></figure><p>完成初步的頁面後，剛好看到Julia的app，發現她有使用上一頁的功能</p><p>覺得很厲害，所以我有樣學樣自己加了一個button然後用Sugue拉線</p><p>執行模擬器時確實可以返回上一頁，但總覺得怪怪的，因為每按一次返回頁面就會多加一個，現在連接的頁面很少所以不會有lag的問題，但如果今天是大量的頁面呢？</p><p>接著我上網搜尋了許多資料，照著網路上教的一步一步操作，到了凌晨兩點多還是卡關…（應該是上班一整天太累 所以後來就先洗洗睡了😂明日再戰）</p><p>到了隔天早上一樣是卡關＝ ＝</p><p>所以求助了蜘蛛人大神</p><p>原來只要在首頁前加入 Navigation controller 之後的view頁面就會自動生成back的按鈕</p><p>看到back哥跑出來後，我很開心地執行了模擬器</p><p>結果…乾 back哥根本沒有出來露面</p><p>他就像無人機一樣開啟隱形模式 讓我滿臉問號</p><p>玩了一下依然卡關</p><p>又跑去求助夜猴(Night Monkey)</p><p>他秒解了我的疑惑…原來要把開頭的箭頭設定在首頁前的Navigation controller</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*sA3BAHRCS5LD18JN_927DQ.png" /></figure><p>就這樣…一個簡單的app誕生了（身邊的外甥女還在幫我拍手🤣）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*E-XfnMDg_rywl-eA-pfYnw.gif" /></figure><p>註：實作Gif 是使用Quicktime player錄製再使用Gifsky轉檔～～～</p><p>二、GitHub上傳</p><p><a href="https://github.com/linmin927/BenandHolly">linmin927/BenandHolly</a></p><p>以上參考 From Julia</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/app%E5%B0%88%E6%A1%88%E5%88%86%E4%BA%AB%E7%9A%84%E6%96%B9%E6%B3%95-9826129bd4d7">App專案分享的方法</a></p><p>事實證明有個厲害的同學很重要，抄作業很簡單（誤）🤣</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cee9c21a5df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E6%A8%A1%E6%93%AC%E5%99%A8%E5%AF%A6%E4%BD%9Cgif-github%E4%B8%8A%E5%82%B3-7cee9c21a5df">模擬器實作Gif &amp; GitHub上傳</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>