<?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 Ruby on Medium]]></title>
        <description><![CDATA[Stories by Ruby on Medium]]></description>
        <link>https://medium.com/@rubylian?source=rss-5c83c9dd68d0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U-rPZzpupOHgNci0UmE5IQ.jpeg</url>
            <title>Stories by Ruby on Medium</title>
            <link>https://medium.com/@rubylian?source=rss-5c83c9dd68d0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 17:04:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rubylian/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[#18 使用圖片，文字，emoji，邊框 & 圓角製作漂亮卡片/梗圖]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/18-%E4%BD%BF%E7%94%A8%E5%9C%96%E7%89%87-%E6%96%87%E5%AD%97-emoji-%E9%82%8A%E6%A1%86-%E5%9C%93%E8%A7%92%E8%A3%BD%E4%BD%9C%E6%BC%82%E4%BA%AE%E5%8D%A1%E7%89%87-%E6%A2%97%E5%9C%96-d32daa90749e?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/d32daa90749e</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 04:40:11 GMT</pubDate>
            <atom:updated>2024-09-30T09:00:46.021Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*M-vQaZlXv0qtkUN8-xwNcA.jpeg" /></figure><p>最近在 Twitter 上爆紅的侏儒河馬太可愛，找了類似卡牌風來做這次作業的練習XD</p><pre>import UIKit<br><br>//backgroung<br>let backgroundView = UIImageView(image: UIImage(named: &quot;background.png&quot;))<br>backgroundView.frame = CGRect(x: 0, y: 0, width: 700, height: 600)<br>backgroundView.layer.cornerRadius = 10<br><br>//hippo<br>let hippoImageView = UIImageView(image: UIImage(named: &quot;hippo.jpeg&quot;))<br>hippoImageView.frame = CGRect(x: 203, y: 90, width: 295, height: 210)<br><br>//name<br>let nameLabel = UILabel(frame: CGRect(x: 255, y: 60, width: 200, height: 20))<br>nameLabel.text = &quot;彈跳豬(Moo Deng)&quot;<br>nameLabel.font = UIFont.boldSystemFont(ofSize: 20)<br>nameLabel.textColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1)<br><br>//describe<br>let describeText = UILabel(frame: CGRect(x: 250, y: 320, width: 200, height: 150))<br>describeText.text = &quot;泰國小侏儒河馬自帶迷因效果在推特上爆紅，主要分布在西非地區，因為棲息地遭破壞，野生的侏儒河馬數量已不到3000隻，被國際自然保護聯盟(IUCN)列為瀕危物種。&quot;<br>describeText.font = UIFont.boldSystemFont(ofSize: 15)<br>describeText.numberOfLines = 0<br><br>//avocado<br>let avocadoLabel = UILabel(frame: CGRect(x: 440, y: 240, width: 50, height: 50))<br>avocadoLabel.text = &quot;🥑&quot;<br>avocadoLabel.font = UIFont.systemFont(ofSize: 50)<br><br>backgroundView.addSubview(hippoImageView)<br>backgroundView.addSubview(nameLabel)<br>backgroundView.addSubview(describeText)<br>backgroundView.addSubview(avocadoLabel)</pre><p><strong>Demo</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*WRNjckbY0wz5pO5pBGmMgw.png" /></figure><p>作業來源：</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/142-%E4%BD%BF%E7%94%A8%E5%9C%96%E7%89%87-%E6%96%87%E5%AD%97-emoji-%E9%82%8A%E6%A1%86-%E5%9C%93%E8%A7%92%E8%A3%BD%E4%BD%9C%E6%BC%82%E4%BA%AE%E5%8D%A1%E7%89%87-401741bf23f7"># 142 使用圖片，文字，emoji，邊框 &amp; 圓角製作漂亮卡片</a></p><pre>參考<br>1. https://www.cna.com.tw/news/aopl/202409150129.aspx</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d32daa90749e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/18-%E4%BD%BF%E7%94%A8%E5%9C%96%E7%89%87-%E6%96%87%E5%AD%97-emoji-%E9%82%8A%E6%A1%86-%E5%9C%93%E8%A7%92%E8%A3%BD%E4%BD%9C%E6%BC%82%E4%BA%AE%E5%8D%A1%E7%89%87-%E6%A2%97%E5%9C%96-d32daa90749e">#18 使用圖片，文字，emoji，邊框 &amp; 圓角製作漂亮卡片/梗圖</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[#17 利用 transition style 控制轉場動畫]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/17-%E5%88%A9%E7%94%A8-transition-style-%E6%8E%A7%E5%88%B6%E8%BD%89%E5%A0%B4%E5%8B%95%E7%95%AB-0fc615d293d9?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fc615d293d9</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 09:15:41 GMT</pubDate>
            <atom:updated>2024-09-10T10:19:44.015Z</atom:updated>
            <content:encoded><![CDATA[<p>使用 transition style 控制動畫效果時，搭配Navigation Controller與否會影響接Segue的方式。</p><p>除了手動操作之外，<a href="https://developer.apple.com/design/human-interface-guidelines/">iOS app 設計相關文章</a>和 <a href="https://developer.apple.com/">Apple 開發官網</a>也一併研究。</p><h4>無搭配Navigation Controller：</h4><ol><li>Button拉Segue，選擇Action Segue &gt; Show</li><li>選取轉場目標的Controller，點選想要的Transition Style</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*i75Uu1KywKX_56sQ071H8g.png" /></figure><h4>有搭配Navigation Controller：</h4><ol><li>Button拉Segue，選擇Action Segue &gt; Present Modally</li><li>選取轉場目標的Controller，點選想要的Transition Style</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*3EOVaISHNDG6Y1q5vYFAaQ.png" /></figure><blockquote><strong><em>Transition Style</em></strong></blockquote><ul><li>Cover Vertical：新頁面的轉場效果由下而上出現(default)。</li><li>Flip Horizontal：新頁面的轉場效果左右旋轉(水平翻頁)。</li><li>Cross Dissolve: 新頁面的轉場效果淡入淡出。</li><li>Partial Curl : 新頁面的轉場翻頁效果。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*94q71iN4V57Dis01xLQBcw.png" /></figure><p>Apple 開發官網：</p><ul><li><a href="https://developer.apple.com/documentation/uikit/uiviewcontroller/1621388-modaltransitionstyle">modalTransitionStyle | Apple Developer Documentation</a></li><li><a href="https://developer.apple.com/documentation/uikit/uipageviewcontroller/transitionstyle">UIPageViewController.TransitionStyle | Apple Developer Documentation</a></li></ul><p>作業來源：</p><p><a href="https://apppeterpan.hashnode.dev/transition-style">利用 transition style 控制轉場動畫</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fc615d293d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/17-%E5%88%A9%E7%94%A8-transition-style-%E6%8E%A7%E5%88%B6%E8%BD%89%E5%A0%B4%E5%8B%95%E7%95%AB-0fc615d293d9">#17 利用 transition style 控制轉場動畫</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[#16 研究UIImageView的Contentmode]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/16-%E7%A0%94%E7%A9%B6uiimageview%E7%9A%84contentmode-daec7e5c280a?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/daec7e5c280a</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 06:49:46 GMT</pubDate>
            <atom:updated>2024-09-10T10:21:19.107Z</atom:updated>
            <content:encoded><![CDATA[<p>研究 <strong>UIImageView </strong>的 Contentmode 顯示效果。</p><blockquote><em>Content Mode</em></blockquote><ul><li>Scale To Fill — 圖片完全填滿，不會依照圖片原始尺寸的比例去做縮放(容易造成圖片變形)。</li><li>Aspect Fit — 依照圖片原始尺寸的比例去填滿(容易造成留白的情況)。</li><li>Aspect Fill — 依照圖片的原始尺寸比例去填滿(比例不對圖片會超出)。<br>勾選Clip to Bounds會裁切掉超出View部分的圖片</li><li>Center — 圖片於Image View的中心。</li><li>Top — 圖片於Image View的上方。</li><li>Bottom — 圖片於Image View的下方。</li><li>Left — 圖片於Image View的左方。</li><li>Right — 圖片於Image View的右方。</li><li>Top Left — 圖片於Image View的左上方。</li><li>Top Right — 圖片於Image View的右上方。</li><li>Bottom Left — 圖片於Image View的左下方。</li><li>Bottom Right — 圖片於Image View的右下方。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*bPb86wkERjJzO_dXUtAWcQ.png" /></figure><p>Apple 開發官網：</p><p><a href="https://developer.apple.com/documentation/uikit/uiimageview">UIImageView | Apple Developer Documentation</a></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/%E7%A0%94%E7%A9%B6-uiimageview-%E7%9A%84-content-mode-bd4e611b31ad">研究 UIImageView 的 Content Mode</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daec7e5c280a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/16-%E7%A0%94%E7%A9%B6uiimageview%E7%9A%84contentmode-daec7e5c280a">#16 研究UIImageView的Contentmode</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[#15 研究輸入多行文字的 UITextView]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/15-%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%A4%9A%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-uitextview-27a85e005816?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/27a85e005816</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 10:41:28 GMT</pubDate>
            <atom:updated>2024-09-10T10:26:20.651Z</atom:updated>
            <content:encoded><![CDATA[<p>研究多行文字的 <strong>UITextView</strong>，提供使用者輸入輸入多行文字，可捲動。</p><p>除了手動操作之外，<a href="https://developer.apple.com/design/human-interface-guidelines/">iOS app 設計相關文章</a>和 <a href="https://developer.apple.com/">Apple 開發官網</a>也一併研究。</p><blockquote><strong><em>Behavior</em></strong></blockquote><ul><li>Editable — 勾選後可編輯文字。</li><li>Selectable —勾選後可選擇/複製文字 。</li></ul><p>Data Detectors — 可設定連結的類型，如Phone Number，Link，Address。</p><p>勾選Selectable且不勾選Editable才會有自動將文字變成連結的功能，再加上勾選Data Detectors中的Phone Number，Link，Address後可點選顯示打電話、網頁、地圖。</p><blockquote><strong><em>keyboard</em></strong></blockquote><ul><li>Do not dismiss — 滑動 TextView 時鍵盤不會消失。</li><li>Dismiss on drag — 滑動 TextView 時鍵盤會消失。</li><li>Dismiss interactively — 當編輯 TextView 點選內容往下滑到鍵盤時，鍵盤會消失。</li></ul><blockquote><strong><em>Find &amp; Replace</em></strong></blockquote><p>從 iOS 16 開始，在編輯文字時，內建提供 Find &amp; Replace 功能。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*2wsOXICikBJ3aZKRvy0MDA.png" /></figure><p>或是</p><pre>textView.isFindInteractionEnabled = true</pre><p>Apple 開發官網：</p><p><a href="https://developer.apple.com/documentation/uikit/uitextview">UITextView | Apple Developer Documentation</a></p><p>human-interface-guidelines：</p><p><a href="https://developer.apple.com/design/human-interface-guidelines/text-views">Text views | Apple Developer Documentation</a></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/%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%A4%9A%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-uitextview-b3e0090c12e1">研究輸入多行文字的 UITextView</a></p><pre>參考<br>1. 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/%E4%B8%8D%E5%AF%AB%E4%B8%80%E8%A1%8C-swift-%E7%A8%8B%E5%BC%8F-%E9%BB%9E%E6%93%8A%E5%9C%96%E7%89%87%E9%A1%AF%E7%A4%BA%E7%B6%B2%E9%A0%81-75eb168610eb<br>2. 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/ios-16-texteditor-uitextview-%E7%9A%84-find-and-replace-8617d605eb71<br>3. 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-2-6-%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%A4%9A%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-uitextview-425021e8ca5a</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27a85e005816" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/15-%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%A4%9A%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-uitextview-27a85e005816">#15 研究輸入多行文字的 UITextView</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[#14 研究輸入單行文字的 Text Field]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/14-%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%96%AE%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-text-field-55eac7554ad8?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/55eac7554ad8</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 09:47:02 GMT</pubDate>
            <atom:updated>2024-09-10T10:26:41.284Z</atom:updated>
            <content:encoded><![CDATA[<p>研究單行文字的 <strong>TextField</strong>，提供使用者輸入資訊使用。</p><p>除了手動操作之外，<a href="https://developer.apple.com/design/human-interface-guidelines/">iOS app 設計相關文章</a>和 <a href="https://developer.apple.com/">Apple 開發官網</a>也一併研究。</p><blockquote><strong><em>Placeholder</em></strong></blockquote><p>提示文字，常用於提示使用者輸入正確的資訊，當使用者要輸入時候文字就會消失。</p><blockquote><strong><em>Border Style</em></strong></blockquote><p>文字輸入欄位的邊框樣式。</p><ul><li>None — 沒有邊框。</li><li>Line — 實線邊框。</li><li>Bezel — 斜角邊框。</li><li>Round — 圓角邊框。</li></ul><blockquote><strong><em>Clear Button</em></strong></blockquote><p>在文字輸入欄位中提供清除按鈕Ｘ，以便使用者輸入到一半可以一次清除欄位的內容。</p><ul><li>Never appears — 輸入時完全不提供Ｘ，需透過刪除鍵刪除。</li><li>Appears while editing — 只有在輸入或編輯文字時欄位右邊出現Ｘ。</li><li>Appears unless editing —<em> </em>只有在輸入或編輯文字時欄位右邊不會出現Ｘ(無內容不會出現)。</li><li>Is always visible —欄位右邊一直都會顯示Ｘ。</li></ul><p>Clear when editing begins：每次輸入時就清空之前的內容。</p><blockquote><strong><em>Min Font Size &amp; Adjust to Fit</em></strong></blockquote><p>勾選Adjust to Fit，當欄位縮小時，文字會跟著縮小，文字會縮小到設定的Min Font Size(Min Font Size一定要設定比文字原本的大小還要小，不然就不會出現此效果)。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*IkBo66CR5iktcX5rYULdBQ.png" /></figure><blockquote><strong><em>Content Type</em></strong></blockquote><p>定義欄位所輸入的資料類型，如電話、信用卡卡號等。</p><blockquote><strong><em>Capitalization</em></strong></blockquote><p>輸入的文字轉換為大寫。</p><ul><li>None — 基本上輸入什麼就是什麼，不會轉換大寫。</li><li>Words — 每一個單字的字首都會變成大寫。</li><li>Sentences — 每一句的第一個字字首轉換為大寫。</li><li>All Characters — 輸入的每一個字串都轉換為大寫。</li></ul><blockquote><strong><em>Keyboard Type</em></strong></blockquote><p>提供鍵盤格局樣式類型選擇，分為Default、ASCII Capable、Numbers and Punctuation、URL、Number Pad、PhonePad、Name Phone Pad、Phone Pad、E-mail Address、Decimal Pad、Twitter、Web Search、ASCII Capable Number。</p><blockquote><strong><em>Keyboard Look</em></strong></blockquote><p>鍵盤顏色樣式設定，分為Default、Dark、Light。</p><blockquote><strong><em>Return Key</em></strong></blockquote><p>當輸入時會跳出鍵盤，鍵盤最右下方顯示的文字。</p><p>Auto-enable Return Key — 勾選後必須輸入內容才能按或是進行下一個欄位的輸入。</p><p>Secure Text Entry — 勾選後輸入文字時不會顯示輸入的內容，提供資料遮罩，如輸入密碼、重要資訊等。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*ccj6Pyq-q15eATy44uxWNA.png" /></figure><p>human-interface-guidelines：</p><p><a href="https://developer.apple.com/design/human-interface-guidelines/text-fields">Text fields | Apple Developer Documentation</a></p><p>Apple 開發官網：</p><p><a href="https://developer.apple.com/documentation/SwiftUI/TextField">TextField | Apple Developer Documentation</a></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/%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%96%AE%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-uitextfield-48ff1671e64f">研究輸入單行文字的 UITextField</a></p><pre>參考<br>1. 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-uitextcontenttype-%E9%A1%AF%E7%A4%BA%E4%BD%BF%E7%94%A8%E8%80%85%E7%9A%84%E9%9B%BB%E8%A9%B1%E5%92%8C-email-928cc19de1e1<br>2. https://apppeterpan.medium.com/%E7%A2%BA%E4%BF%9D%E4%BD%BF%E7%94%A8%E8%80%85%E8%BC%B8%E5%85%A5%E5%85%A7%E5%AE%B9%E7%9A%84auto-enable-return-key-db80b4155855</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55eac7554ad8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/14-%E7%A0%94%E7%A9%B6%E8%BC%B8%E5%85%A5%E5%96%AE%E8%A1%8C%E6%96%87%E5%AD%97%E7%9A%84-text-field-55eac7554ad8">#14 研究輸入單行文字的 Text Field</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[#13 研究顯示文字的 UILabel]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/13-%E7%A0%94%E7%A9%B6%E9%A1%AF%E7%A4%BA%E6%96%87%E5%AD%97%E7%9A%84-uilabel-79808a7a0c42?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/79808a7a0c42</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 06:50:20 GMT</pubDate>
            <atom:updated>2024-09-09T09:24:44.590Z</atom:updated>
            <content:encoded><![CDATA[<p>研究 <strong>UILabel</strong> 的一些欄位：Line Breaks, Autoshrink, Shadow</p><p>除了手動操作之外，<a href="https://developer.apple.com/design/human-interface-guidelines/">iOS app 設計相關文章</a>和 <a href="https://developer.apple.com/">Apple 開發官網</a>也一併研究。</p><blockquote><strong><em>Line Breaks</em></strong></blockquote><p>文字斷行設定，必須先確定Label空間，否則再怎麼設定行數設定都顯示不出來。</p><ul><li>Clip — 依照 Label 的長度顯示文字(超過長度的文字會被裁切無法顯示)。</li><li>Character Wrap — 在 Label 寬度內自動換行，以「字元」為單位換行(英文單字會被打斷，中文沒影響)。</li><li>Word Wrap — 在 Label 寬度內自動換行，以「英文單字」為單位換行。</li><li>Truncate Head —當句子過長時，句子前段會以…代替(縮減開頭)</li><li>Truncate Middle — 當句子過長時，句子中段會以…代替(縮減中間)</li><li>Truncate Tail — 當句子過長時，句子後段會以…代替(縮減結尾)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*KZBXxk894oO9okHnoUaXUA.png" /></figure><blockquote><strong><em>Autoshrink</em></strong></blockquote><p>文字縮放。</p><ul><li>Fixed Font Size — 固定字體大小(default)。</li><li>Minimum Font Scale — 字串過長時，字體會調整最小倍數大小以顯示全部文字。</li><li>Minimum Font Size — 字串過長時，依字型大小會調整最小尺寸以顯示全部文字。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*36yGhXbYdx5pE6sC4qCUjg.png" /></figure><blockquote><strong><em>Shadow</em></strong></blockquote><p>文字陰影。</p><ul><li>Shadow — 沒有陰影(default)。</li></ul><p>Apple 開發官網：</p><p><a href="https://developer.apple.com/documentation/uikit/uilabel/1620536-shadowcolor">shadowColor | Apple Developer Documentation</a></p><p>Shadow Offset：陰影距離</p><ul><li>Width — width &gt; 0 ： 陰影往右移，數字越大越往右移動。<br>&lt; 0 ：陰影往左移。</li><li>Height — height &gt; 0 ：陰影往下移，數字越大越往下做移動。<br>&lt; 0 ：陰影會被往上移。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*7-rHF04xYfISCX8Cc10esg.png" /></figure><p>Apple 開發官網：</p><p><a href="https://developer.apple.com/documentation/uikit/uilabel/1620528-shadowoffset">shadowOffset | Apple Developer Documentation</a></p><p>human-interface-guidelines：</p><p><a href="https://developer.apple.com/design/human-interface-guidelines/labels">Labels | Apple Developer Documentation</a></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/%E7%A0%94%E7%A9%B6%E9%A1%AF%E7%A4%BA%E6%96%87%E5%AD%97%E7%9A%84-uilabel-121ddffa9bb">研究顯示文字的 UILabel</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79808a7a0c42" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/13-%E7%A0%94%E7%A9%B6%E9%A1%AF%E7%A4%BA%E6%96%87%E5%AD%97%E7%9A%84-uilabel-79808a7a0c42">#13 研究顯示文字的 UILabel</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[#12 模仿一頁精美的 App 畫面]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/12-%E6%A8%A1%E4%BB%BF%E4%B8%80%E9%A0%81%E7%B2%BE%E7%BE%8E%E7%9A%84-app-%E7%95%AB%E9%9D%A2-b8e6af98ff69?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8e6af98ff69</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 08:17:13 GMT</pubDate>
            <atom:updated>2024-08-23T08:26:21.776Z</atom:updated>
            <content:encoded><![CDATA[<p>決定用我最常使用的App — Apple Music 來練習！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*4mrv5anMRqf3aejU.png" /></figure><h4>1. 先查詢解析度再調整圖片的尺寸</h4><p>因為 iPhone 有許多不同的解析度，為了方便稍後查詢原圖裡的各個元件大小(圖片尺寸單位為 pixel，開發 app 的元件大小單位為 point)，必須先把原圖調整到 point 的單位。</p><p>而我的手機是iPhone 12，由此可知解析度(Scale Factor)是 3x。可是我想換手機嘿嘿嘿，所以模擬一下 iPhone 15 的畫面！</p><h4>2. 查詢畫面裡元件的大小位置顏色</h4><p>使用內建的 Preview，拉住框框會顯示它的大小以及顏色的RGB。</p><h4>3. 模仿 Apple Music 畫面</h4><p>不知道相似度有沒有八成呢？最困難的點是最下面半透明的那塊和陰影，我是用各種重疊出來的XD，但總感覺會有更好的方法！</p><h4><strong>Demo</strong></h4><p>左邊是原圖，右邊是模仿的結果</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*wQNLInXfJlo58bYcCbv7dA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oaR7ECOfcjZlz5M35od5Kw.png" /></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%E6%95%99%E5%AE%A4/instagram-app-%E6%A8%A1%E4%BB%BF-%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-ios-app-%E4%BD%9C%E6%A5%AD-f1b2d10019f0">模仿一頁精美的 App 畫面 (可將其它作業要求的各種 UI 加到此作業，比方陰影效果，點選文字顯示網頁等)</a></p><pre>參考<br>1. https://www.kkbox.com/hk/tc/song/4rg-Sy-gSSJLpvJuuQ<br>2. https://yangcha.github.io/iview/iview.html<br>3. 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/11-uibutton-%E8%AE%93%E6%8C%89%E9%88%95%E8%AE%8A%E6%88%90%E5%9C%93%E5%BD%A2%E4%B8%A6%E4%BE%86%E9%BB%9E%E4%BE%86%E9%BB%9E%E5%9B%9E%E9%A5%8B%E6%84%9F%E5%90%A7-b62f77ed21cb<br>4. 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%AE%93-view-%E8%AE%8A%E5%9C%93%E8%A7%92%E7%9A%84-layer-cornerradius-54aa7afda2a1<br>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/%E7%AD%86%E8%A8%98-develop-in-swift-data-collections-table-views-4439597f4805">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%AD%86%E8%A8%98-develop-in-swift-data-collections-table-views-4439597f4805</a></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8e6af98ff69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/12-%E6%A8%A1%E4%BB%BF%E4%B8%80%E9%A0%81%E7%B2%BE%E7%BE%8E%E7%9A%84-app-%E7%95%AB%E9%9D%A2-b8e6af98ff69">#12 模仿一頁精美的 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[#11 定義 function，印出讓自己一秒落淚的情歌歌詞]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/11-%E5%AE%9A%E7%BE%A9-function-%E5%8D%B0%E5%87%BA%E8%AE%93%E8%87%AA%E5%B7%B1%E4%B8%80%E7%A7%92%E8%90%BD%E6%B7%9A%E7%9A%84%E6%83%85%E6%AD%8C%E6%AD%8C%E8%A9%9E-6496a21b7c6b?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6496a21b7c6b</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 13:10:22 GMT</pubDate>
            <atom:updated>2024-04-21T03:26:18.569Z</atom:updated>
            <content:encoded><![CDATA[<p>一生一定要看一次五月天的演唱會😍身為五迷的我，當然要幫五月天多多宣傳歌曲，加入五月天永遠不會太遲！！！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*05QRaCWckRCIwZlD.jpg" /><figcaption>photo by 相信音樂</figcaption></figure><p>推薦MAYDAY 五月天 [ 突然好想你 Suddenly missing you so bad ] Official Music Video</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FGtDRcXtDg-4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGtDRcXtDg-4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FGtDRcXtDg-4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e4c1749be17144366dae2f0a66c1c32/href">https://medium.com/media/0e4c1749be17144366dae2f0a66c1c32/href</a></iframe><p>原始歌詞：</p><pre>作詞：阿信     作曲：阿信<br><br>最怕空氣突然安靜 最怕朋友突然的關心<br>最怕回憶 突然翻滾絞痛著不平息 最怕突然 聽到你的消息<br>想念如果會有聲音 不願那是悲傷的哭泣<br>事到如今 終於讓自己屬於我自己 只剩眼淚 還騙不過自己<br><br>突然好想你 你會在哪裡 過得快樂或委屈<br>突然好想你 突然鋒利的回憶 突然模糊的眼睛<br><br>我們像一首最美麗的歌曲 變成兩部悲傷的電影<br>為什麼你 帶我走過最難忘的旅行 然後留下 最痛的紀念品<br><br>我們 那麼甜那麼美那麼相信 那麼瘋那麼熱烈的曾經<br>為何我們還是要奔向各自的幸福和遺憾中老去<br><br>突然好想你 你會在哪裡 過得快樂或委屈<br>突然好想你 突然鋒利的回憶 突然模糊的眼睛<br><br>最怕空氣突然安靜 最怕朋友突然的關心<br>最怕回憶 突然翻滾絞痛著不平息 最怕突然 聽到你的消息<br><br>最怕此生 已經決心自己過沒有你 卻又突然 聽到你的消息</pre><p>用 function 印出重覆的段落：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*i2qRZDD2n82pndc_z2CSzg.png" /></figure><p>改編版：</p><pre>func 過年期間(name: String) {<br>    print(&quot;最怕空氣突然安靜 最怕\(name)突然的關心&quot;)<br>    print(&quot;最怕回憶 突然翻滾絞痛著不平息 最怕突然 聽到\(name)的消息&quot;)<br>}<br><br>過年期間(name: &quot;親戚&quot;)</pre><p>作業來源：</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%AE%9A%E7%BE%A9-function-%E5%8D%B0%E5%87%BA%E8%AE%93%E8%87%AA%E5%B7%B1%E4%B8%80%E7%A7%92%E8%90%BD%E6%B7%9A%E7%9A%84%E6%83%85%E6%AD%8C%E6%AD%8C%E8%A9%9E-851ff4147fda">#64 定義 function，印出讓自己一秒落淚的情歌歌詞</a></p><pre>參考<br>1. https://www.kkbox.com/hk/tc/song/4rg-Sy-gSSJLpvJuuQ</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6496a21b7c6b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/11-%E5%AE%9A%E7%BE%A9-function-%E5%8D%B0%E5%87%BA%E8%AE%93%E8%87%AA%E5%B7%B1%E4%B8%80%E7%A7%92%E8%90%BD%E6%B7%9A%E7%9A%84%E6%83%85%E6%AD%8C%E6%AD%8C%E8%A9%9E-6496a21b7c6b">#11 定義 function，印出讓自己一秒落淚的情歌歌詞</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[#10 研究 Learn to code 1 的 Commands & Functions 關卡]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/10-%E7%A0%94%E7%A9%B6-learn-to-code-1-%E7%9A%84-commands-functions-%E9%97%9C%E5%8D%A1-338f71bcad03?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/338f71bcad03</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 19:05:12 GMT</pubDate>
            <atom:updated>2024-04-06T14:59:25.010Z</atom:updated>
            <content:encoded><![CDATA[<p>下載 Swift Playgrounds 並且選擇 Learn to Code 系列，目前我先從 Commands 和 Functions 開始練習：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_Qds6ueH74s1Fc65AIsWQ.png" /></figure><p><strong>Demo</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zv6I8VTyGUUkk4CoJlQbYA.png" /></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%BE%9E-swift-playgrounds-%E7%9A%84-learn-to-code-%E7%8E%A9%E9%81%8A%E6%88%B2%E5%AD%B8%E7%A8%8B%E5%BC%8F-f4fe9cb27ca6">從 Swift Playgrounds 的 Learn to code 玩遊戲學程式</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=338f71bcad03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/10-%E7%A0%94%E7%A9%B6-learn-to-code-1-%E7%9A%84-commands-functions-%E9%97%9C%E5%8D%A1-338f71bcad03">#10 研究 Learn to code 1 的 Commands &amp; Functions 關卡</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[#9 請 AI 出一些變數計算的練習題]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/9-%E8%AB%8B-ai-%E5%87%BA%E4%B8%80%E4%BA%9B%E8%AE%8A%E6%95%B8%E8%A8%88%E7%AE%97%E7%9A%84%E7%B7%B4%E7%BF%92%E9%A1%8C-22911cf26969?source=rss-5c83c9dd68d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/22911cf26969</guid>
            <dc:creator><![CDATA[Ruby]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 17:55:31 GMT</pubDate>
            <atom:updated>2024-04-06T14:29:46.109Z</atom:updated>
            <content:encoded><![CDATA[<p>利用助教 ChatGPT 出題練習變數計算滿有趣的，一步一步熟悉練習 Swift 的基本語法 XD</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*No3mBuh1DT7vTCF-36lbzg.jpeg" /></figure><ul><li>建立一個名為 number1 的變數，賦予值 50，然後再建立另一個名為 number2 的變數，賦予值 20。請計算這兩個數的加、減、乘、除，並將結果分別儲存在 addition、subtraction、multiplication 及 division 四個變數中。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*NuQ0dbqnbgaN1iXDZ7akCw.png" /></figure><ul><li>建立一個名為 radius 的變數，賦予值 10，請計算半徑為 radius 的圓面積，並將結果儲存在名為 area 的變數中。圓面積的計算公式為 π*r² (π 是 3.1416)。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*yvgeOeLW3y95FfWCYTTJ4g.png" /></figure><ul><li>建立兩個名為 length 及 width 的變數，分別賦予值 20 和 10。請計算長為 length、寬為 width 的矩形面積，並將結果儲存在名為 rectangleArea 的變數中。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Uan_qqRfnLMwxhdDgjkAzQ.png" /></figure><ul><li>建立一個名為 celsius 的變數，賦予值 35。請將此攝氏溫度轉為華氏溫度，並將結果儲存在名為 fahrenheit 的變數中。華氏溫度的計算公式為 F = C*9/5 + 32。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*J1NO6o3nW_UAZ-LiF_yOEg.png" /></figure><ul><li>建立一個名為 principal 的變數，賦予值 1000。建立另一個名為 rate 的變數，賦予值 0.05。建立第三個名為 time 的變數，賦予值 5。請計算這筆本金在給定的利率和時間下的簡單利息，並將結果儲存在名為 simpleInterest 的變數中。簡單利息的計算公式為 I = PRT (P 是本金、R 是年利率、T 是時間)。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*PyAKuskPUs4x9k8vX_g-WA.png" /></figure><p>作業來源：</p><p><a href="https://chat.openai.com/share/a648f8fd-e4dd-40e3-a9a6-6d316aa698d8">ChatGPT</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22911cf26969" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/9-%E8%AB%8B-ai-%E5%87%BA%E4%B8%80%E4%BA%9B%E8%AE%8A%E6%95%B8%E8%A8%88%E7%AE%97%E7%9A%84%E7%B7%B4%E7%BF%92%E9%A1%8C-22911cf26969">#9 請 AI 出一些變數計算的練習題</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>