<?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 葛洪亮 on Medium]]></title>
        <description><![CDATA[Stories by 葛洪亮 on Medium]]></description>
        <link>https://medium.com/@koleon?source=rss-693773d0fc5a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*YDFtcWvGAk8bAh5l</url>
            <title>Stories by 葛洪亮 on Medium</title>
            <link>https://medium.com/@koleon?source=rss-693773d0fc5a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 14:21:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@koleon/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[#2梗圖產生器]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/2%E6%A2%97%E5%9C%96%E7%94%A2%E7%94%9F%E5%99%A8-3d17f67984da?source=rss-693773d0fc5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d17f67984da</guid>
            <dc:creator><![CDATA[葛洪亮]]></dc:creator>
            <pubDate>Mon, 22 Aug 2022 10:02:43 GMT</pubDate>
            <atom:updated>2022-08-22T10:23:58.513Z</atom:updated>
            <content:encoded><![CDATA[<p>按一個按鈕便從網路上抓下梗圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*tb2Ct39a151yvwPmaI99LQ.gif" /></figure><blockquote>使用API來獲得梗圖</blockquote><p>用https://memes.tw/wtf/api?來獲得每日熱門的梗圖，用URLSession來避免主畫面當機，然後用async來換照片和文字</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*ABmXeQoP5H4e-u4DW4fVmg.png" /></figure><blockquote>用自訂型別來儲存從API得到的Jason檔案</blockquote><p>因為Jason檔案不只一層所以需要多個自訂型別來儲存，而Jason的第一層是陣列所以需要需要用Array來儲存</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*NXWUtZF6NZ6X4-L1cyWOtg.png" /></figure><blockquote>從得到的一群梗圖中隨機挑一張梗圖</blockquote><p>使用Int.random來隨機挑一張梗圖，再取得他的圖片和標題然後將Label和Imageview改成梗圖的圖片和標題就大功告成了</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*x2mUL09KQiKaM2Xr2_HrBA.png" /></figure><blockquote>改進方向</blockquote><p>我認為可以繼續改進的方向</p><p>1不重複出現梗圖</p><p>2儲存喜歡的梗圖</p><p>3使用callback的技巧讓程式變得更簡潔</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d17f67984da" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/2%E6%A2%97%E5%9C%96%E7%94%A2%E7%94%9F%E5%99%A8-3d17f67984da">#2梗圖產生器</a> was originally published in <a href="https://medium.com/peter-pan-swift-ios-class">彼得潘的 Swift iOS / Flutter App 開發教室</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# 1 使用圖片，文字，emoji，邊框 & 圓角製作漂亮卡片]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/1-%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-c2c46e0e1a65?source=rss-693773d0fc5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2c46e0e1a65</guid>
            <dc:creator><![CDATA[葛洪亮]]></dc:creator>
            <pubDate>Mon, 01 Aug 2022 10:24:38 GMT</pubDate>
            <atom:updated>2022-08-01T10:24:38.234Z</atom:updated>
            <content:encoded><![CDATA[<p>練習在playground做卡片</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rs0H55WzicAa9YlIPbrERw.png" /><figcaption>偷偷用合照練習一下</figcaption></figure><blockquote>首先選擇想要的圖片</blockquote><p>用UIimage將圖片匯入，再將UIimage轉成UIimageView，用UIimageView設定圖片的大小。再加入想加的文字，最後使用.addSubView把文字Label加入到UIimageView裏。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aaf_I1dSsVWGdRu3Laa_nQ.png" /></figure><blockquote>加入Emoji和文字</blockquote><p>使用Label加入文字和Emoji，使用.font和.textColor來設定文字的顏色和大小，將Label的文字設定成Emoji來加入Emoji。用CGRect來設定Emoji的大小和位址使它出現在畫面的四個角，最後再用addSubView加入UIimageView</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*joITpSkIjSv236uWI06hUw.png" /></figure><blockquote>設定編框寬度和顏色</blockquote><p>使用.layer.borderWidth和.layer.borderColor來設定邊框的寬度和顏色還有透明度，可以上網找喜歡的顏色並記下RGB</p><h4>成果展示</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rs0H55WzicAa9YlIPbrERw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2c46e0e1a65" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/1-%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-c2c46e0e1a65"># 1 使用圖片，文字，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>
    </channel>
</rss>