<?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/@4a1h0012?source=rss-3ad42f647d9d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KONqOQAlpgFxi_WdpTrERA.png</url>
            <title>Stories by 吳洺葍 on Medium</title>
            <link>https://medium.com/@4a1h0012?source=rss-3ad42f647d9d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:56:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@4a1h0012/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實作]]></title>
            <link>https://medium.com/@4a1h0012/%E8%8A%9D%E5%8A%A0%E5%93%A5%E5%A4%A7%E5%AD%B8%E7%9A%84%E5%9C%88%E5%9C%88%E5%8F%89%E5%8F%89-app%E5%AF%A6%E4%BD%9C-e1e3f9b3071e?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1e3f9b3071e</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Thu, 07 Mar 2019 13:18:50 GMT</pubDate>
            <atom:updated>2019-03-07T13:18:50.320Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>學習目的：<br>利用 UIBezierPath 做出九宮格<br>UIPanGestureRecognizer 移動OOXX的 View<br>UIViewPropertyAnimator 製作小視窗移動動畫效果<br>CABasicAnimation 實現連線動畫</blockquote><h4><strong>1.首先準備九宮格，不然無從玩起，這裡會利用到UIBezierPath來描出九宮格的線</strong></h4><p>-第一步打開Xcode，開啟專案，然後拉出一個View，大小位置參考下圖。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*CzeeMxk2evV6i9WqI_WoWQ.png" /></figure><p>-再拉出九個View格子，空隙間隔為12.5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VC4KAFR16VXW2pM__t4y2A.png" /></figure><p>-將九格的View拉線到ViewController控制，利用outlet collection方式將所有格子連結，注意必須按照順序</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7q0SNgd7IZWBBWAdLk_5Xg.png" /></figure><p>-之後準備UIBezierPath，使用方法可以參考<em>彼得潘</em>的教學，這裡我直接標示使用結果</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><p>-新增一個UIView的Class，給我們剛第一個拉出的View來控制</p><pre><strong>import</strong> UIKit</pre><pre><strong>class</strong> GridView: UIView {<br></pre><pre><strong>override</strong> <strong>func</strong> draw(<strong>_</strong> rect: CGRect) {</pre><pre><strong>let</strong> path = UIBezierPath()</pre><pre><strong>let</strong> squareWidth: CGFloat = 110</pre><pre><strong>let</strong> lineWidth: CGFloat = 12.5</pre><pre><strong>var</strong> y = squareWidth + lineWidth/2</pre><pre>path.move(to: CGPoint(x: 0, y: y))</pre><pre>path.addLine(to: CGPoint(x: rect.width, y: y))</pre><pre>y += squareWidth + lineWidth</pre><pre>path.move(to: CGPoint(x: 0, y: y))</pre><pre>path.addLine(to: CGPoint(x: rect.width, y: y))</pre><pre><strong>var</strong> x = squareWidth + lineWidth/2</pre><pre>path.move(to: CGPoint(x: x, y: 0))</pre><pre>path.addLine(to: CGPoint(x: x, y: rect.height))</pre><pre>x += squareWidth + lineWidth</pre><pre>path.move(to: CGPoint(x: x, y: 0))</pre><pre>path.addLine(to: CGPoint(x: x, y: rect.height))<br></pre><pre>path.lineWidth = lineWidth</pre><pre>UIColor.purple.setStroke()</pre><pre>path.stroke()</pre><pre>}</pre><pre>}</pre><p>-結果如下，空隙被紫色線填滿</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*V6kIygknVSUQZqPD72tgjA.png" /></figure><h4><strong>2.之後將剩下畫面做出來，還需要做出ＯＯＸＸ的方塊</strong></h4><p>-加入 Ｏ &amp; Ｘ 的 <strong>Label</strong>，做出來會呈現下方，大小與九宮格長寬一樣，設定alpha為0.5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*bZPxwkRi070Vlisfpwco8A.png" /></figure><p>-Ｏ &amp; Ｘ中間有一個<strong>Button</strong>，圖示利用xcode提供的樣式info Light，作用是點擊跑出一個小視窗，創建一個UIView我們稱為InfoView</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Pvl3KR746p-4EThTrHOrrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*cB_gnx5sI-Lc2Iml5lmTBg.png" /></figure><p>-將視窗的Label連結到<strong>InfoView.swift</strong>中去控制，這裡有小Bug，不能從storyboard直接拉線到程式碼，必須手動在程式碼打好從程式那邊拉線到storyboard中的Label</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*DJvjzg0gijP03hsIjUEe-A.png" /></figure><p>-現在開始做視窗動畫，點擊Info Button後，InfoView從螢幕上方移動到中間，當按下ＯＫ按鈕，InfoView再往下離開螢幕外</p><p>-將InfoView連結到<strong>ViewController.swift</strong>裡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-Grj8eknvBlxADTFTdy3w.png" /></figure><p>-這時再去連結InfoButton的Action</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYEkTDIZrJkCT-MO7ITUWg.png" /></figure><p>-點擊時去顯示InfoView，並顯示遊戲說明，首先<strong>InfoView.swift</strong>裡面寫出一個function，用來移動InfoView，使用<strong>UIViewPropertyAnimator</strong>來移動視窗</p><pre>func show(text: String){</pre><pre>textLabel.text = text</pre><pre>//將InfoView擺在前面不被擋到</pre><pre>superview?.bringSubviewToFront(self)</pre><pre>let animator = UIViewPropertyAnimator(duration: 1, curve: .easeIn) {</pre><pre>self.center = self.superview!.center</pre><pre>}</pre><pre>animator.startAnimation()</pre><pre>}</pre><p>-這時我們就可以在InfoButton的Action裡寫上遊戲說明</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K9LdeToZzdXuLFWaVmR92g.png" /></figure><p>-接下來製作關閉InfoView動畫，在<strong>InfoView.swift</strong>裡一樣寫一個function</p><pre>func close(){</pre><pre>let animator = UIViewPropertyAnimator(duration: 1, curve: .easeIn) {</pre><pre>self.frame.origin.y = self.superview!.frame.maxY</pre><pre>}</pre><pre>animator.addCompletion { (_) in</pre><pre>self.frame.origin.y = -self.frame.height</pre><pre>}</pre><pre>animator.startAnimation()</pre><pre>}</pre><p>-將 InfoView 上 OK 的 Button 連一個action到<strong>ViewController.swift</strong>裡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bceYp6ttjHVePFzbd58N5w.png" /></figure><p>-結果如下</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*9TYY2fUGi9MUPINbx1Gj6g.gif" /></figure><h4><strong>3.輪到Ｏ or Ｘ開始時，顯示旋轉動畫</strong></h4><p>-首先連結Ｏ &amp; Ｘ的outlet到<strong>ViewController.swift</strong>裡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*axy5sW2d6ypXNASesUIn9w.png" /></figure><p>-開始寫旋轉動畫的程式碼，將O or X Label帶入就可以做出旋轉動畫</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gk30I10En5J9K_KFQTDuTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_1GJv95ucpxSyqpB1Td3g.png" /></figure><h4><strong>4.移動Ｏ &amp; Ｘ，接下來會利用UIPanGestureRecognizer來實現移動方塊</strong></h4><p>-第一步先拉<strong>UIPanGestureRecognizer</strong>元件到畫面上再將O的Label拉到元件上，如圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*N8L3s_1kjLvCwaTs08S_6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*ZvutP2Teys9ILdE12fDEDA.png" /></figure><ul><li>再將<strong>UIPanGestureRecognizer</strong>元件連結IBAction，拖曳時觸發，下面print顯示移動的距離，也就是我們只要記錄下Label的起始位置並加上移動距離，就可以移動方塊，這是移動的第一種方法</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NO68E1IuEhS1Q-s_RlSM5w.png" /><figcaption>translation.x &amp; translation.y 代表移動的距離</figcaption></figure><p>方法1:調整origin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zXeA7V5RO21wPdOcF4Yn5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LIcO_uK8PPbQO14oM2DyPQ.png" /></figure><p>也可改成調整oLabel.center，下面的改成label.center = …</p><p>方法2:也可以將traslation歸零這樣就不用一開始記錄Label起始位置了</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vV2swp3XjHK1SqvLRJiszg.png" /></figure><p>方法4：調整tranform移動Ｏ＆Ｘ，達成方式與方法一類似</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-IpndYSDSO2wv20gUX1Rw.png" /></figure><p>-最後調成放開Ｏ＆Ｘ跑回原本位置</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzdHTWAKiziuT3unGu1vsQ.png" /></figure><h4><strong>5.判斷Ｏ＆Ｘ停在哪一格</strong></h4><p>-利用func intersects(_ rect2: CGRect) -&gt; Bool來判斷兩個矩形的交集</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9a8PFdWuDPeal7EJjxAHLg.png" /></figure><p>然而這樣會有缺點，當Ｏ ＆ Ｘ 放在九宮格線上時，會同時交集兩格以上，這時判斷並不是交集的面積，而是方格順序，Ｏ＆Ｘ會放在方格序列較靠前的位置</p><p>-利用func intersection(_ r2: CGRect) -&gt; CGRect，判斷交集的面積</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dFLmcgDozvadIisFGCrLYg.png" /></figure><p>會將每個square去比對交集面積，最後最大的將會是結果</p><h4>6.接下來就是輪流，換下一個玩家</h4><p>-就是當方塊放到九宮格時，要換下一個玩家，在原本的Label新增新的Label並且換另一個Label使用</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpzJIEYx3MKFmj1Eja1DpQ.png" /></figure><p>上述表示紀錄下Label原始位置，並在結束後傳到finishCurrentTurn中</p><p>-finishCurrentTurn作用是當Label放在九宮格結束時觸發的動作，在if裡判斷Ｏ＆Ｘ的順序</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJCwL6XFy5ok6088qSnvug.png" /></figure><p>-產生newLabel的方法</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZASVFEU4brqYYIkhwn24Ww.png" /></figure><p>-將gestureRecognizer連結outlet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HfSnO-NcIHpnWoVOU7H6gw.png" /></figure><p>-並在takeTurn的function裡加入gestureRecognizer，如下</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70Srg_6fbKcgUN8j6fZ7sg.png" /></figure><h4>7.判斷佔據格子與輸贏</h4><p>-創一個Grid model，在ViewController實例</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*zrnffSxh9s4Vu-09CgL6tQ.png" /></figure><p>Grid.swift</p><pre>import UIKit</pre><pre>class Grid {</pre><pre>enum Piece {</pre><pre>    case o</pre><pre>    case x</pre><pre>}</pre><pre>let squareCount = 9</pre><pre>lazy var squares = [Piece?](repeating: nil, count: squareCount)</pre><pre>let lines = [[0, 1, 2], [3, 4, 5], [6, 7, 8],                         [0, 3, 6], [1, 4, 7], [2, 5, 8],[0, 4, 8], [2, 4, 6]]</pre><pre>var winner: Piece? {</pre><pre>    var winner: Piece?</pre><pre>    for line in lines {</pre><pre>        if let firstPiece = squares[line[0]]{</pre><pre>            let result = line.allSatisfy{(index) -&gt; Bool in</pre><pre>            return squares[index] == firstPiece </pre><pre>            }</pre><pre>        if result {</pre><pre>            winner = firstPiece</pre><pre>            break</pre><pre>        }</pre><pre>    }</pre><pre>}</pre><pre>return winner</pre><pre>}</pre><pre>var isFull: Bool{</pre><pre>    return squares.indices.allSatisfy { (index) -&gt; Bool in return       isSquareEmpty(index: index) == false</pre><pre>}</pre><pre>}</pre><pre>var isTie: Bool {</pre><pre>    if isFull, winner == nil {</pre><pre>    return true</pre><pre>} else {</pre><pre>    return false</pre><pre>}</pre><pre>}</pre><pre>func isSquareEmpty(index: Int) -&gt; Bool {</pre><pre>    return squares[index] == nil</pre><pre>}</pre><pre>func occupy(piece: Piece, on index: Int){</pre><pre>    squares[index] = piece</pre><pre>}</pre><pre>func clear() {</pre><pre>    squares = [Piece?](repeating: nil, count: squareCount)</pre><pre>}</pre><pre>}</pre><p>ViewController.swift</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xXHVC7NfxcVDeq8H5QOy6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U2aHKAPHW2D4u4h7mmSzQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bo8hLUcCxZCoYWkMwinDsw.png" /></figure><p>-顯示結果輸贏</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sKznnSvulSQwsF-iLoGoWQ.png" /></figure><p>-開始新一輪遊戲</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iMc-5vnmOX3phqcJMaKqQA.png" /></figure><p>-基本上圈圈叉叉遊戲就完成了</p><h4>8.利用CABasicAnimation做連線動畫</h4><p>-取得連線位置</p><p>Grid.swift</p><pre>var winnerLines: [[Int]] {</pre><pre>    var winnerLines = [[Int]]()</pre><pre>    for line in lines {</pre><pre>    if let firstPiece = squares[line[0]] {</pre><pre>        let result = line.allSatisfy { (index) -&gt; Bool in</pre><pre>        return squares[index] == firstPiece</pre><pre>    }</pre><pre>    if result {</pre><pre>        winnerLines.append(line)</pre><pre>    }<br>}</pre><pre>}</pre><pre>return winnerLines</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7hdY4V5buklt0Uy4VsUOIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iKiVh_df6ckLPYcIXxB--g.png" /></figure><p>這樣就有完整的圈圈叉叉了。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1e3f9b3071e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[抓地圖API利用Google Map for iOS]]></title>
            <link>https://medium.com/@4a1h0012/%E6%8A%93%E5%9C%B0%E5%9C%96api%E5%88%A9%E7%94%A8google-map-for-ios-fce3fd7f4bcb?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fce3fd7f4bcb</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Sat, 08 Dec 2018 11:58:50 GMT</pubDate>
            <atom:updated>2018-12-08T12:01:14.565Z</atom:updated>
            <content:encoded><![CDATA[<h3>利用Google Map for iOS 學習地圖API</h3><blockquote>學習CocoaPods 來安裝第三方函式庫<br>學習使用Google Map API<br>利用GPS抓取使用者位置</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*EKRVoAoImVO6YL6docxXew.png" /></figure><p><strong>1.首先搜尋Google Map for iOS<br></strong>-可參考官方或是其他別人教學<br>ex: <a href="https://medium.com/@Wei_Wei/google-maps-for-ios-%E4%BD%BF%E7%94%A8-swift-4-f074eeaa5350">Google Maps for iOS (使用 Swift 4) by 魏巍</a></p><p><strong>2.學習裝函式庫</strong><br>-可以看<a href="https://www.youtube.com/watch?v=8reci3eXRys&amp;feature=youtu.be">魏巍的影片</a>學習如何安裝<br>-如果安裝過CocoaPods，使用終端機輸入cd到專案資料夾路徑，資料夾路徑可參考<a href="https://ephrain.net/mac-%E5%9C%A8-finder-%E4%B8%AD%E5%BF%AB%E9%80%9F%E8%A4%87%E8%A3%BD%E8%B7%AF%E5%BE%91%E3%80%81%E9%96%8B%E5%95%9F%E6%8C%87%E5%AE%9A%E8%B3%87%E6%96%99%E5%A4%BE/">網站</a><br>-終端機輸入<strong>pod init</strong>產生一個 pod file，打開pod file修改成如下<br>target ‘專案名稱不用理’ do<br> <strong>pod ‘GoogleMaps’<br> pod ‘GooglePlaces’</strong><br>end<br>-回到終端機輸入<strong>pod install</strong>，安裝好就可以關掉終端機了，關掉目前的專案<br>-打開專案裡的<strong>Workspace</strong></p><p><strong>3.使用Google Map</strong><br>-到AppDelegate.swift裡新增<br><strong>import GoogleMaps<br></strong>-在application(_:didFinishLaunchingWithOptions:)裡面新增<strong>GMSServices.provideAPIKey(“YOUR_API_KEY”)<br></strong>-這樣就可以使用Google Map了，接下來到Main.storyboard裡把UIView 拉到畫面上，然後將UIView的類別，改成 <strong>GMSMapView</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*vrZOQX8o_hHVZd-Nw4-opQ.png" /></figure><p>-到程式碼中<strong>import</strong> GoogleMaps，並將UIView拉進去命名成 map view<br>-簡單定個位置跟marker</p><pre>import UIKit<br>import GoogleMaps<br><br>class YourViewController: UIViewController {<br><br>  // You don&#39;t need to modify the default init(nibName:bundle:) method.</pre><pre>  <strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> mapView: GMSMapView!</pre><pre>  override func loadView() {<br>    // Create a GMSCameraPosition that tells the map to display the<br>    // coordinate -33.86,151.20 at zoom level 6.<br>    let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 151.20, zoom: 6.0)<br>    mapView.camera = camera<br><br>    // Creates a marker in the center of the map.<br>    let marker = GMSMarker()<br>    marker.position = CLLocationCoordinate2D(latitude: -33.86, longitude: 151.20)<br>    marker.title = &quot;Sydney&quot;<br>    marker.snippet = &quot;Australia&quot;<br>    marker.map = mapView<br>  }<br>}</pre><p><strong>4.利用定位去抓使用者位置並顯示到畫面上</strong><br>-使用CLLocationManager來檢查位置，在使用前須先要求權限提示<br>Privacy — Location When In Use Usage Description加入.plist<br>-使用CLLocationManager開啟定位，會在使用者使用期間開啟</p><pre><strong>var</strong> myLocationMgr: CLLocationManager!</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>myLocationMgr = CLLocationManager()</pre><pre>myLocationMgr.delegate = <strong>self</strong></pre><pre>myLocationMgr.requestWhenInUseAuthorization() <em>// request user authorize</em></pre><pre>myLocationMgr.distanceFilter = kCLLocationAccuracyNearestTenMeters <em>// update data after move ten meters</em></pre><pre>myLocationMgr.desiredAccuracy = kCLLocationAccuracyBest</pre><pre>}</pre><p>-利用CLLocationManagerDelegate更新定位地點</p><pre><strong>func</strong> locationManager(<strong>_</strong> manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {</pre><pre><strong>let</strong> currentLocation: CLLocation = locations[0] <strong>as</strong> CLLocation</pre><pre><strong>if</strong> <strong>let</strong> location = locations.first {</pre><pre>mapView.animate(toLocation: location.coordinate)</pre><pre>mapView.animate(toZoom: 18)</pre><pre>myLocationMgr.stopUpdatingLocation()</pre><pre>}</pre><pre>}</pre><p>-還要寫檢查使用者定位權限使否開啟</p><pre><strong>func</strong> locationManager(<strong>_</strong> manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {</pre><pre><em>// Get user author</em></pre><pre><strong>switch</strong> status {<br></pre><pre><strong>case</strong> .authorizedWhenInUse:</pre><pre>myLocationMgr.startUpdatingLocation() <em>// Start location</em></pre><pre>mapView.isMyLocationEnabled = <strong>true</strong></pre><pre>mapView.settings.myLocationButton = <strong>true<br></strong></pre><pre><strong>case</strong> .denied:</pre><pre><strong>let</strong> alertController = UIAlertController(title: &quot;定位權限已關閉&quot;, message:&quot;如要變更權限，請至 設定 &gt; 隱私權 &gt; 定位服務 開啟&quot;, preferredStyle: .alert)</pre><pre><strong>let</strong> okAction = UIAlertAction(title: &quot;確認&quot;, style: .default, handler:<strong>nil</strong>)</pre><pre>alertController.addAction(okAction)</pre><pre><strong>self</strong>.present(alertController, animated: <strong>true</strong>, completion: <strong>nil</strong>)<br></pre><pre><strong>default</strong>:</pre><pre><strong>break</strong></pre><pre>}</pre><pre>}</pre><p>GitHub:</p><p><a href="https://github.com/WuMinFu/GoogleMapAPP">WuMinFu/GoogleMapAPP</a></p><p>參考：</p><ul><li><a href="https://developers.google.com/maps/documentation/ios-sdk/intro?hl=zh-tw">Overview | Maps SDK for iOS | Google Developers</a></li><li><a href="https://medium.com/@Wei_Wei/google-maps-for-ios-%E4%BD%BF%E7%94%A8-swift-4-f074eeaa5350">Google Maps for iOS (使用 Swift 4)</a></li><li><a href="https://ithelp.ithome.com.tw/articles/10194607">iOS App 實作(9) GPS 定位-2(Google Map) - iT 邦幫忙::一起幫忙解決難題，拯救 IT 人的一天</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/%E6%9C%9F%E6%9C%ABapp-%E5%B0%8B%E6%89%BE%E9%A4%90%E5%BB%B3-2-2c087c6799bd">期末APP — 尋找餐廳(2.)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fce3fd7f4bcb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[做出相機功能的相簿藝廊]]></title>
            <link>https://medium.com/@4a1h0012/%E5%81%9A%E5%87%BA%E7%9B%B8%E6%A9%9F%E5%8A%9F%E8%83%BD%E7%9A%84%E7%9B%B8%E7%B0%BF%E8%97%9D%E5%BB%8A-c56edb4408cf?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c56edb4408cf</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Mon, 05 Nov 2018 14:55:15 GMT</pubDate>
            <atom:updated>2019-03-26T07:39:27.503Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>學習目的：<br>-利用UICollectionView<br>-實做出拍照與相機功能<br>-利用PropertyListEncoder將資料轉成Data寫檔與讀檔</blockquote><p><strong>1.利用CollectionVIew horizointal做出相簿藝廊的樣子<br></strong>-參考影片做出基本樣子</p><p>參考：</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FSL1ZmIp83iI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSL1ZmIp83iI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FSL1ZmIp83iI%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/dfae22b41cdde5959d7ca22c8d8a0979/href">https://medium.com/media/dfae22b41cdde5959d7ca22c8d8a0979/href</a></iframe><p><strong>2.新增Button用來開啟相機與相簿功能</strong><br>-首先要三種權限來開啟相機功能，在 App的Info.plist頁面內，新增以下三種權限，並且在後面Value欄位後面key上說明</p><ul><li>Privacy — Camera Usage Description：使用Camera的權限請求。</li><li>Privacy — Photo Library Additions Usage Description：寫入 photo album的權限請求。</li><li>Privacy — Photo Library Usage Description：讀取 photo album的權限請求。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4nNq0WUEHJbkrKdwu4IZRg.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/%E7%B0%A1%E6%98%93%E8%AA%AA%E6%98%8Eswift-4-%E5%9F%BA%E6%9C%ACcamera%E8%88%87album%E4%BD%BF%E7%94%A8%E7%B0%A1%E4%BB%8B-19f2ad1cfef8">『簡易說明Swift 4』基本Camera與Album使用簡介</a></p><p>在要觸發相機的地方新增以下片段：</p><pre><strong>let</strong>  cameraPicker = UIImagePickerController()</pre><pre>cameraPicker.delegate = <strong>self</strong></pre><pre>cameraPicker.allowsEditing = <strong>true</strong></pre><pre>//sourceType有三種，分別為photoLibrary、camera與savedPhotosAlbum。</pre><pre>cameraPicker.sourceType = .camera</pre><pre><em>//在需要的地方present出来</em></pre><pre><strong>self</strong>.present(cameraPicker, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><p>在結束拍照或是選取相簿結束的動作時，會觸發以下函示：</p><pre><strong>func</strong> imagePickerController(<strong>_</strong> picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : <strong>Any</strong>]) {</pre><pre>//image是捕捉的照片</pre><pre><strong>    guard</strong> <strong>let</strong> image =    <br>        info[UIImagePickerController.InfoKey.originalImage] <strong>as</strong>?   <br>        UIImage <strong>else</strong>       <br>    {</pre><pre><strong>        return</strong></pre><pre>    }</pre><pre>//這裡可以將image放到畫面上，我是將照片存起來</pre><pre><strong>    self</strong>.imageArrary.append(Picture(image: image.pngData()!))</pre><pre>    Picture.saveFile(picture: imageArrary)</pre><pre>    myCollectionView.reloadData()</pre><pre><em>// 退出相機介面</em></pre><pre>    picker.dismiss(animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>}</pre><p><strong>3.利用PropertyListEncoder將資料轉成Data寫檔與讀檔</strong><br>-新增一個Swift File(快捷鍵cmd+N)，自訂型別</p><pre><strong>import</strong> Foundation</pre><pre><strong>struct</strong> Picture : Codable{</pre><pre><strong>var</strong> image : Data</pre><pre>//創建檔案路徑<strong><br>static</strong> <strong>let</strong> documentsDirectory = FileManager.default.urls(for: .documentDirectory,  in: .userDomainMask).first!</pre><pre><em>//需要Codable才能轉型</em></pre><pre>//儲存檔案<strong><br>static</strong> <strong>func</strong> saveFile(picture: [Picture]){</pre><pre><strong>    let</strong> propertyEncoder = PropertyListEncoder()</pre><pre><strong>    if</strong> <strong>let</strong> data = <strong>try</strong>? propertyEncoder.encode(picture){</pre><pre><strong>        let</strong> url =  Picture.documentsDirectory.appendingPathComponent(&quot;picture&quot;)</pre><pre><strong>        try</strong>? data.write(to: url)</pre><pre>        print(url)</pre><pre>    }</pre><pre>}</pre><pre>//讀取檔案<strong><br>static</strong> <strong>func</strong> readFromFile() -&gt; [Picture]? {</pre><pre><strong>    let</strong>  propertyDecoder = PropertyListDecoder()</pre><pre><strong>    let</strong> url =    Picture.documentsDirectory.appendingPathComponent(&quot;picture&quot;)</pre><pre>    print(url)</pre><pre><strong>    if</strong> <strong>let</strong> data = <strong>try</strong>? Data(contentsOf: url),<strong>let</strong> lovers = <strong>try</strong>?     propertyDecoder.decode([Picture].<strong>self</strong>, from: data){</pre><pre><strong>return</strong> lovers</pre><pre>    }<strong>else</strong>{</pre><pre><strong>        return</strong> <strong>nil</strong></pre><pre>    }</pre><pre>}</pre><pre>}</pre><p>-在ViewDidLoad讀取檔案</p><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>    super</strong>.viewDidLoad()</pre><pre><strong>    if</strong> <strong>let</strong> picture = Picture.readFromFile(){</pre><pre><strong>        self</strong>.imageArrary = picture</pre><pre>    }</pre><pre>}</pre><p>-儲存檔案在結束拍照那裡有示範，與讀取大同小異</p><p>到目前為止可以做出以下圖片效果：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*pex9bpL5EjuOxdobz2tqkA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*aTjWGIViQB3NyKuNyEC6-g.gif" /></figure><p><strong>進階版本：</strong></p><blockquote>-UICollectionView點擊功能跳到另一個ViewController<br>-控制新的ViewController去顯示圖片與刪除圖片，利用prepare跟delegate</blockquote><p><strong>1.UICollectionView點擊跳往下一頁<br></strong>-新增ViewController，將Background取消<br>-拉一個Visual Effect View元件到View上面<br>-拉UICollectionView的cell到新增ViewController選擇Present Modally方式跳轉<br>-點擊中間的Segue那條線設定資訊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*01egR2xNSBFQFFV3v-LRGA.png" /></figure><p>這樣點擊會有淡出的效果，參考：</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDmWv-JtQH4Q%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDmWv-JtQH4Q&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDmWv-JtQH4Q%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/387e62709e492c48b22c1cfa67415a2a/href">https://medium.com/media/387e62709e492c48b22c1cfa67415a2a/href</a></iframe><p><strong>2.將ViewController拉好並設置好畫面後，在原畫面準備prepare將資料丟給它</strong><br>-須先在被丟資料的Controller檔裡宣告要接收的資料<br>-在viewDidLoad用if來等待接收<br>-接下來就可以在原畫面的Controller檔，寫prepare函式</p><pre><strong>override</strong> <strong>func</strong> prepare(for segue: UIStoryboardSegue, sender: <strong>Any</strong>?) {</pre><pre><strong>if</strong> <strong>let</strong> controller = segue.destination <strong>as</strong>? PhotoViewController, <strong>let</strong> indexPath = <strong>self</strong>.myCollectionView.indexPathsForSelectedItems {</pre><pre>controller.photoImage = indexPath[0].row</pre><pre>controller.delegate = <strong>self</strong></pre><pre>    }</pre><pre>}</pre><p>3.設置delegate來處理按下刪圖片返回上一頁更新畫面<br>-在下一頁新增協定，並新增宣告delegate等待接收指令</p><pre><strong>import</strong> UIKit</pre><pre><strong>protocol</strong>  EditPhotoViewControllerDelegate  {</pre><pre><strong>    func</strong>  update()</pre><pre>}</pre><pre><strong>class</strong> PhotoViewController: UIViewController {</pre><pre><strong>    var</strong> delegate : EditPhotoViewControllerDelegate?</pre><pre>}</pre><p>-在原畫面定義協定的內容</p><pre><strong>extension</strong> ViewController: EditPhotoViewControllerDelegate{</pre><pre><strong>    func</strong> update() {</pre><pre><strong>        if</strong> <strong>let</strong> indexPath = myCollectionView.indexPathsForSelectedItems{</pre><pre><strong>            self</strong>.imageArrary.remove(at: indexPath[0].row)</pre><pre>            myCollectionView.reloadData()</pre><pre>            print(&quot;reload&quot;)</pre><pre>        }</pre><pre>    }</pre><pre>}</pre><p>-在我們利用prepare傳資料時，將對方delegate指向self(如第二步驟)<br>-當按下刪除圖片時執行的動作時就可以觸發delegate</p><pre><strong>@IBAction</strong> <strong>func</strong> deletButton(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre>    imageArrary.remove(at: photoImage!)</pre><pre>    Picture.saveFile(picture: imageArrary)</pre><pre>    delegate?.update()</pre><pre>    dismiss(animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>}</pre><p>這樣我們就可以完成刪除圖片的動作了</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*wDVPkBxccHqMy5Z29V6g0w.gif" /></figure><p>GitHub:</p><p><a href="https://github.com/WuMinFu/AddUIcollectionviewApp">WuMinFu/AddUIcollectionviewApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c56edb4408cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[試著抓iTunes API練習]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E8%A9%A6%E8%91%97%E6%8A%93itunes-api%E7%B7%B4%E7%BF%92-81477d409565?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/81477d409565</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Mon, 20 Aug 2018 08:49:42 GMT</pubDate>
            <atom:updated>2018-08-20T08:49:42.130Z</atom:updated>
            <content:encoded><![CDATA[<p>使用URLSession.shared.dataTask</p><p><a href="https://developer.apple.com/documentation/foundation/urlsession/1410330-datatask">dataTask(with:completionHandler:) | Apple Developer Documentation</a></p><p>解析JSON網站:</p><p><a href="http://jsoneditoronline.org/">JSON Editor Online - view, edit and format JSON online</a></p><p>試聽使用<strong>import</strong> AVFoundation</p><pre><strong>@IBAction</strong> <strong>func</strong> previewSongButton(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre><strong>let</strong> player = AVPlayer(url: previewUrl!)</pre><pre><strong>let</strong> playerLayer = AVPlayerLayer(player: player)</pre><pre>playerLayer.frame = <strong>self</strong>.view.bounds</pre><pre><strong>self</strong>.view.layer.addSublayer(playerLayer)</pre><pre>player.play()</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*zGoCa6hIUO4v5ghYilqWrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*1G6WU-WwCpln1em0XtYMQA.png" /></figure><p>GitHub:</p><p><a href="https://github.com/WuMinFu/iTunesMusicApp">WuMinFu/iTunesMusicApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81477d409565" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E8%A9%A6%E8%91%97%E6%8A%93itunes-api%E7%B7%B4%E7%BF%92-81477d409565">試著抓iTunes API練習</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[客製出自己的TableView]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%AE%A2%E8%A3%BD%E5%87%BA%E8%87%AA%E5%B7%B1%E7%9A%84tableview-3af45ed6de98?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3af45ed6de98</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Mon, 13 Aug 2018 03:06:44 GMT</pubDate>
            <atom:updated>2018-08-13T03:10:20.484Z</atom:updated>
            <content:encoded><![CDATA[<p>我選擇紀錄美食的資訊，cell顯示圖片、名字、資訊，點擊利用prepare傳資料給下一頁</p><p>1. 如果不使用Table View Controller，則需自己拉一個Table View到View Controller裡，再將Table View Cell放到Table View裡，如下圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*mluJpN6oDJRkfCcDTDQkSA.png" /></figure><p>2. 點選我們的Table View，點不到可以從左邊列表點選，點完後將dataSource、delegate拉給View Controller</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*hzqKg-NyUGR7kGuJ3aUGuA.png" /></figure><p>3. 接下來先將畫面拉一拉，將想要的圖片、文字放好，記得將<strong>Table View Cell設定identifier的名字</strong></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%A6%82%E4%BD%95%E8%AE%93-table-view-cell-%E5%9B%BA%E5%AE%9A%E9%AB%98%E5%BA%A6-77e7ab6f6a4">如何讓 table view cell 固定高度</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*6kMkY27Lj401I9tpcaRBMg.png" /></figure><p>4. 接下來我們可以到ViewController.swift裡去設置我們要加的屬性了，繼承UITableViewDataSource，這時會出現錯誤，利用fix功能會自動跑出要自訂的函數</p><pre>//設定要給予cell的屬性<strong><br></strong> <strong>var</strong> food : [Food] = [Food(image: &quot;咖哩飯&quot;,name: &quot;阿娟咖哩飯&quot;,opening_hr: &quot;時間：\n11:00–21:00&quot;, address: &quot;地址：台南市中西區保安路36號&quot;, information: &quot;地址：台南市中西區保安路36號\n\n電話：06-2248134；06-2209246\n\n營業時間：11:00 - 21:00\n\n公休：週四\n\n推薦菜色：咖哩飯、雞肉飯、鴨肉羹\n\nFB：https://www.facebook.com/pages/阿娟咖哩飯鴨肉羹/329673023713547&quot;, theMenu: &quot;阿娟菜單&quot;,storeMap: &quot;阿娟地圖&quot;)]</pre><pre><strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {</pre><pre><strong>    return</strong> food.count</pre><pre>}</pre><pre><strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {</pre><pre>//等等加</pre><pre>}</pre><p>5. 接下來要將cell上的物件拉outlet，這裡要注意不能直接拉到ViewController，要先創一個TableViewCell.swift檔案，將storyboard的Table View Cell的class導向剛創好的檔案裡，將要拉的outlet拉一拉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*1QhJecgnsX8XJKivwdzDrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mPdv383-_38TaqBSaDARLQ.png" /></figure><p>6. 我們可以開始去設定cell裡的內容了，利用到在第4步驟裡的tableView(_:cellForRowAt:)</p><pre><strong>func</strong> tableView(<strong>_</strong> tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {</pre><pre><strong>    guard</strong> <strong>let</strong> cell = tableView.dequeueReusableCell(withIdentifier: &quot;foodCell&quot;, for: indexPath) <strong>as</strong>? FoodTableViewCell <strong>else</strong> {</pre><pre><strong>    return</strong> UITableViewCell()</pre><pre>    }</pre><pre>    cell.foodImage.image = UIImage(named: food[indexPath.row].image)</pre><pre>    cell.foodNameLabel.text = food[indexPath.row].name</pre><pre>    cell.addressLabel.text = food[indexPath.row].address</pre><pre><strong>    return</strong> cell</pre><pre>}</pre><p>這樣就創好基本客製化了，接下來可以替這個Table View加一些想要的功能</p><blockquote><strong>prepare傳資料給下一頁</strong></blockquote><p>1. 首先創好要傳下一頁的ViewController與其控制的class，將要顯示的圖片或文字拉好outlet，接下來就產生要接收的變數用來給予這些圖片與文字</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gW-Lr3cPp9bCYXASzH3cTg.png" /></figure><p>2. 接下來就可以到prepare裡去傳值了</p><pre><strong>override</strong> <strong>func</strong> prepare(for segue: UIStoryboardSegue, sender: <strong>Any</strong>?) {</pre><pre><strong>    let</strong> controller = segue.destination <strong>as</strong>? StoreTableViewController</pre><pre><strong>    let</strong> indexPath = <strong>self</strong>.foodTableView.indexPathForSelectedRow</pre><pre>    controller?.storeName = food[indexPath!.row].name</pre><pre>    controller?.information  = food[indexPath!.row].information</pre><pre>    controller?.theMenu = food[indexPath!.row].theMenu</pre><pre>    controller?.storeMap = food[indexPath!.row].storeMap</pre><pre>}</pre><p>3. 回到目標的class裡將我們接收到的變數傳給outlet吧</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bIVqWRr8NuS6NDJZ9sN82A.png" /></figure><p>這樣就完成傳遞資料的部分了，這樣就完成簡單的TableView與prepare</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*JxwE0HvwSWZr0pf9EzZFRA.gif" /></figure><p>GitHub:</p><p><a href="https://github.com/WuMinFu/RecordFoodApp">WuMinFu/RecordFoodApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3af45ed6de98" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%AE%A2%E8%A3%BD%E5%87%BA%E8%87%AA%E5%B7%B1%E7%9A%84tableview-3af45ed6de98">客製出自己的TableView</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[問答與選擇-Undertale問與答App]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E5%95%8F%E7%AD%94%E8%88%87%E9%81%B8%E6%93%87-undertale%E5%95%8F%E8%88%87%E7%AD%94app-189ff4eebd35?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/189ff4eebd35</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Wed, 08 Aug 2018 14:36:08 GMT</pubDate>
            <atom:updated>2018-08-08T14:36:40.293Z</atom:updated>
            <content:encoded><![CDATA[<p>我選擇的主題是Undertale，這是一款小品遊戲，跟一般RPG遊戲不同，是史上第一款號稱不殺敵人就可以通關的遊戲，會選擇他也是因為他真的給我帶來很大的感觸，說是<strong>神作</strong>無異議，我App裡主要就是問一些有玩遊戲都會知道的一些知識。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*OS_iXbf-DrJ1ZuJTzgwSJA.png" /></figure><blockquote>學習目的<br>-學習變數<br>-for迴圈<br>-if else <br>-array<br>-類別和物件<br>-亂數<br>-自訂資料型別<br>-viewDidLoad</blockquote><p>我直接從執行階段開始講起給大家提供一個簡單的概念，就不說如何製作了，畢竟太長了。</p><p><strong>1.首先開始畫面時，就會顯示題數、問題、選項</strong></p><p>這裡就要先在viewDidLoad裡使用自訂函數showQuestion()去控制畫面中的Label跟Button的字串</p><pre><strong><br>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>    super</strong>.viewDidLoad()</pre><pre><strong>//讓題目陣列亂掉以達到亂數目的，這裡使用到的questions是自訂的陣列，接下來會補充</strong><br>    questions.shuffle()</pre><pre>    showQuestion()</pre><pre>}</pre><pre><strong>//我會自訂一個func來方便使用改變題目與選項<br>func</strong> showQuestion(){</pre><pre><strong>//抓questions陣列裡的問題字串<br></strong>    questionLabel.text = questions[question_count].question</pre><pre><strong>//將畫面中選項的Button利用Outlet Collection然後用for in給每個選項設置字串<br>    for</strong> choice <strong>in</strong> choiceBtnOutlet{</pre><pre>    choice.setTitle(questions[question_count].choice[choice.tag], for: .normal)</pre><pre>}</pre><pre><strong>//用來計算答題數還有顯示第幾題</strong><br>    question_count += 1</pre><pre>    choiceNumberLabel.text = &quot;第\(question_count)題&quot;</pre><pre>    questionNumberLabel.text = &quot;Q\(question_count):&quot;</pre><pre>}</pre><p><strong>2.點擊選項判斷對與否</strong></p><p>這裡利用if else來判斷選擇的選項是否跟答案一樣</p><pre><strong>@IBAction</strong> <strong>func</strong> choiceButton(<strong>_</strong> sender: UIButton) {</pre><pre><strong>//用來判斷與答案是否正確，去抓Button標題來確認questions的答案<br>    if</strong> sender.currentTitle == questions[question_count-1].answer{</pre><pre>        print(&quot;正確答案&quot;)</pre><pre>        score += 10</pre><pre>    } <strong>else</strong> {</pre><pre>        print(&quot;錯誤&quot;)</pre><pre>    }</pre><pre><strong>//question_count是目前到達第幾題，用來判斷是否答完全部題目<br>    if</strong> question_count == questions.count {</pre><pre>        print(&quot;結束&quot;)</pre><pre>    }<strong>else</strong>{</pre><pre><strong>//如果沒有結束則繼續</strong></pre><pre>    }</pre><pre>}</pre><p><strong>3.我們會使用到的變數還有自訂函數</strong></p><pre><strong>//用來計算你進行到哪一題<br>var</strong> question_count = 0</pre><pre><strong>//用來計算總分<br>var</strong> score = 0</pre><pre><strong>//自訂問題的資料型別<br>struct</strong> QandA{</pre><pre><strong>var</strong> question:String</pre><pre><strong>var</strong> choice:[String]=[]</pre><pre><strong>var</strong> answer:String</pre><pre>}</pre><pre><strong>//利用自訂的型別來完成題目Array<br>var</strong> questions = [</pre><pre>    QandA(question: &quot;請問現在問你問題的是誰?&quot;,choice: <br>    [&quot;Papyrus&quot;,&quot;Sans&quot;,&quot;W.D.Gaster&quot;],answer: &quot;Sans&quot;),</pre><pre>    QandA(question: &quot;請問第一個掉進地下世界的人是誰?&quot;,choice: <br>    [&quot;Toriel&quot;,&quot;Chara&quot;,&quot;Frisk&quot;],answer: &quot;Chara&quot;),</pre><pre>    QandA(question: &quot;Undyne在垃圾場相識並喜歡上的是誰?&quot;,choice:   <br>    [&quot;Papyrus&quot;,&quot;玩家操控的角色&quot;,&quot;Alphys&quot;],answer: &quot;Alphys&quot;)</pre><pre>]</pre><p><strong>4.剩下就是細節的部分，看是要讓圖片改變或是畫面消失出現，效果如下圖</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*OgzOFtE9VFLxHTW1k4QxkA.gif" /></figure><p>主題不難只要釐清邏輯順序就能嘩啦嘩啦的寫出來了，但是花費我一天的時間，主要是找素材的部分很麻煩，還有畫面調整也花了我近半的時間</p><p>GitHub:</p><p><a href="https://github.com/WuMinFu/ChoiceQuestionApp">WuMinFu/ChoiceQuestionApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=189ff4eebd35" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E5%95%8F%E7%AD%94%E8%88%87%E9%81%B8%E6%93%87-undertale%E5%95%8F%E8%88%87%E7%AD%94app-189ff4eebd35">問答與選擇-Undertale問與答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%B7%B4%E7%BF%92%E9%A1%8C-%E6%95%B8%E5%AD%B8%E5%B0%8F%E7%A5%9E%E7%AB%A5-ad10ec2821ec?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad10ec2821ec</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Thu, 02 Aug 2018 08:08:35 GMT</pubDate>
            <atom:updated>2018-08-02T08:08:35.023Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>學習目的<br>-學習 IBOutlet 和 IBAction</blockquote><p>這次的練習並沒有用到新的技巧，基本都是前面所學綜合應用</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*RyDxK1tXNbtq7lHrmhsCew.gif" /></figure><p>將畫面還有會用到的outlet跟action拉好<br>-這裡可以將兩個UITextField跟UISegmented拉到同一個action</p><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> firstNumberTextField: UITextField!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> secondNumberTextField: UITextField!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> answerLabel: UILabel!</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> symbolSegmented: UISegmentedControl!</pre><pre><strong>var</strong> sum = 0.00</pre><pre><strong>@IBAction</strong> <strong>func</strong> calculatorTextField(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre><strong>    if</strong> firstNumberTextField.text != &quot;&quot;,secondNumberTextField.text !=  <br>    &quot;&quot;{</pre><pre>        <strong>//另外寫一個function去計算</strong><br>        calculation(symbol: symbolSegmented.selectedSegmentIndex,<br>        number1: firstNumberTextField.text!,number2:  <br>        secondNumberTextField.text!)</pre><pre>        answerLabel.text = &quot;答案：\(String(format: &quot;%0.2f&quot;, sum))&quot;</pre><pre>     }</pre><pre>}</pre><p>計算的function：</p><pre><strong>func</strong> calculation(symbol:Int,number1:String,number2:String){</pre><pre><strong>    switch</strong> symbol {</pre><pre><strong>    case</strong> 0:</pre><pre>    sum = Double(number1)!+Double(number2)!</pre><pre><strong>    case</strong> 1:</pre><pre>    sum = Double(number1)!-Double(number2)!</pre><pre><strong>    case</strong> 2:</pre><pre>    sum = Double(number1)!*Double(number2)!</pre><pre><strong>    case</strong> 3:</pre><pre>    sum = Double(number1)!/Double(number2)!</pre><pre><strong>    default</strong>:</pre><pre><strong>    break</strong></pre><pre>    }</pre><pre>}</pre><p>GitHub:</p><p><a href="https://github.com/WuMinFu/CalculationApp/blob/master/CalculationApp/ViewController.swift">WuMinFu/CalculationApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad10ec2821ec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E7%B7%B4%E7%BF%92%E9%A1%8C-%E6%95%B8%E5%AD%B8%E5%B0%8F%E7%A5%9E%E7%AB%A5-ad10ec2821ec">練習題-數學小神童</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[Light App的應用]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/light-app%E7%9A%84%E6%87%89%E7%94%A8-51154f14745b?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/51154f14745b</guid>
            <category><![CDATA[swif]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 15:10:14 GMT</pubDate>
            <atom:updated>2018-08-01T15:10:14.590Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>學習目的<br>-練習 IBOutlet 和 IBAction<br>-利用 UIColor 物件，UIImage 物件和亂數</blockquote><p>當進入App會隨機選一種顏色或是貼圖，之後點擊按照順序切換畫面，圖片我選用美食圖，聽說黃色會刺激一些食慾不知道是不是真的？</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*4IlJChles6dXzuSXOFM1tg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*mu1TNwFwSv8YoDgMt6GAAg.gif" /></figure><p>1.以第一張Gif圖為基礎，首先產生各種顏色物件<br>(參考：<a href="https://www.webnots.com/vibgyor-rainbow-color-codes/">https://www.webnots.com/vibgyor-rainbow-color-codes/</a>)</p><pre><strong><br>let</strong> violet = UIColor(red: 148/255, green: 0, blue: 211/255, alpha: 1)</pre><pre><strong>let</strong> indigo = UIColor(red: 75/255, green: 0, blue: 130/255, alpha: 1)</pre><pre><strong>let</strong> blue = UIColor(red: 0, green: 0, blue: 1, alpha: 1)</pre><pre><strong>let</strong> green = UIColor(red: 0, green: 1, blue: 0, alpha: 1)</pre><pre><strong>let</strong> yellow = UIColor(red: 1, green: 1, blue: 0, alpha: 1)</pre><pre><strong>let</strong> orange = UIColor(red: 1, green: 127/255, blue: 0, alpha: 1)</pre><pre><strong>let</strong> red = UIColor(red: 1, green: 0, blue: 0, alpha: 1)<br></pre><p>2.接下來準備一個放顏色的陣列跟一個產生亂數的常數等下用</p><pre><strong>var</strong> rainbow : [UIColor] = [UIColor]()</pre><pre><strong>var</strong> colorNumber = Int.random(in: 0...6)</pre><p>3.在viewDidLoad()將我們剛生成的顏色放進去</p><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>    rainbow = [violet,indigo,blue,green,yellow,orange,red]</pre><pre>    //當進入畫面設置一個顏色<br>    view.backgroundColor = rainbow[colorNumber]</pre><pre>}</pre><p>4.接下來準備點擊畫面的action，可以使用Button，我是使用TapGestureRecognizer這個元件一樣可以</p><pre><strong>@IBAction</strong> <strong>func</strong> colorChange(<strong>_</strong> sender: <strong>Any</strong>) {</pre><pre>    view.backgroundColor = rainbow[colorNumber]</pre><pre><strong>    if</strong> colorNumber == 6 {</pre><pre>        colorNumber = 0</pre><pre>    } <strong>else</strong> {</pre><pre>        colorNumber += 1</pre><pre>    }</pre><pre>}</pre><p>這樣就完成進入畫面隨機一種顏色並且點擊切換7彩的顏色了</p><p>彩虹切換GitHub:</p><p><a href="https://github.com/WuMinFu/ColorChangeApp/blob/master/ColorChangeApp/RainbowColorVC.swift">WuMinFu/ColorChangeApp</a></p><p>接下來是第二張Gif圖的圖片切換，與第一張Gif異曲同工之妙</p><p>1.放圖進去Assets，並且生成圖片名稱的陣列還有隨機亂數</p><pre><strong>let</strong> imageName = [&quot;咖喱飯&quot;,&quot;蝦仁飯加蛋&quot;,&quot;魚羹飯&quot;,&quot;拌飯&quot;,&quot;麻辣鍋燒意麵&quot;]</pre><pre><strong>var</strong> imageNumber = Int.random(in: 0...4)</pre><p>2.這裡要拉一個imageView的outlet來使用，並且再拉一個action來切換這個imageView的outlet</p><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> imageView: UIImageView!</pre><pre><strong>@IBAction</strong> <strong>func</strong> imageChangeClick(<strong>_</strong> sender: UITapGestureRecognizer) {</pre><pre>    ...</pre><pre>}</pre><p>3.在action裡面寫上要切換圖片的程式碼</p><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> imageView: UIImageView!</pre><pre><strong>@IBAction</strong> <strong>func</strong> imageChangeClick(<strong>_</strong> sender: UITapGestureRecognizer) {</pre><pre>    imageView.image = UIImage(named: imageName[imageNumber])</pre><pre><strong>    if</strong> imageNumber == 4{</pre><pre>        imageNumber = 0</pre><pre>    } <strong>else</strong> {</pre><pre>        imageNumber += 1</pre><pre>    }</pre><pre>}</pre><p>兩邊其實差別不大只要了解需要的物件還有action如何使用便可完成</p><p>美食圖切換GitHub：</p><p><a href="https://github.com/WuMinFu/ColorChangeApp/blob/master/ColorChangeApp/imageChangeVC.swift">WuMinFu/ColorChangeApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51154f14745b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/light-app%E7%9A%84%E6%87%89%E7%94%A8-51154f14745b">Light 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/%E8%A9%A6%E7%85%89%E9%A1%8C-%E4%BB%80%E9%BA%BC%E9%83%BD%E5%8F%AF%E4%BB%A5%E7%9A%84%E5%80%92%E6%95%B8%E8%A8%88%E6%99%82%E5%99%A8-537d1293fc84?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/537d1293fc84</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 04:28:12 GMT</pubDate>
            <atom:updated>2018-08-01T04:28:12.161Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>學習目的<br>-學習使用Date Picker<br>-利用Date的function來抓時間<br>-將抓到的時間變成字串顯示</blockquote><p>老實說想不到有啥主題可以使用的，反正倒數可以很多樣就做個可以倒數跟計算距離過去時間的。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*mO3SXt1B-6kCmZ77znvipA.png" /></figure><p>1.可以使用Date()來抓現在系統時間，利用DateFormatter()來設定時間格式</p><pre><strong>//抓現在時間<br>let</strong> now = Date()</pre><pre><strong>//設定時間格式<br>let</strong> formatter = DateFormatter()</pre><pre>formatter.dateFormat = &quot;yyyy年MM月dd日 HH時：mm分&quot; //英文字母為要抓的時間</pre><pre>//將抓到的時間丟進去就可以轉成我們想要看到的格式<strong><br>let</strong> dateString = formatter.string(from: now)</pre><p>2.學會將系統時間轉成我們要的字串後就可以丟到Label去顯示了</p><p>3.之後是使用Date Picker，利用action去設定</p><pre><strong>@IBAction</strong> <strong>func</strong> selectDatePicker(<strong>_</strong> sender: UIDatePicker) {</pre><pre><strong>//利用剛剛技巧，我們可以抓到Date Picker的date並轉成字串<br>let</strong> selectDate = sender.date</pre><pre><strong>let</strong> selectDateString = formatter.string(from: selectDate)</pre><pre><strong>//.timeIntervalSince()為計算兩個時間的差距，會得到一個以秒為單位的結果，轉Int是因為他是Double，精準到小數點後<br>let</strong> intervalTime = Int(selectDate.timeIntervalSince(now))</pre><pre><strong>//時間計算，將秒轉成天數、小時、分鐘<br>let</strong> intervalDay = intervalTime/60/60/24</pre><pre><strong>let</strong> intervalHour = (intervalTime/60/60)%24</pre><pre><strong>let</strong> intervalMin = intervalTime%(60*60)/60</pre><pre><strong>//接下來就可以將抓到的時間設置到Label上了<br>...</strong></pre><pre>}</pre><p>4.Date Picker的屬性欄位<br>-Mode為顯示選項可以為只有Date或是只有Time<br>-可以設定Locale轉成中文方便我們辨識</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*D0ryIHfv2YU388zELJlNMA.png" /></figure><p>GitHub:</p><p><a href="https://github.com/WuMinFu/DateExercise/blob/master/DateExercise/ViewController.swift">WuMinFu/DateExercise</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=537d1293fc84" width="1" height="1" alt=""><hr><p><a href="https://medium.com/peter-pan-swift-ios-class/%E8%A9%A6%E7%85%89%E9%A1%8C-%E4%BB%80%E9%BA%BC%E9%83%BD%E5%8F%AF%E4%BB%A5%E7%9A%84%E5%80%92%E6%95%B8%E8%A8%88%E6%99%82%E5%99%A8-537d1293fc84">試煉題-什麼都可以的倒數計時器！</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[調色大師：各種Kitty的衣服顏色]]></title>
            <link>https://medium.com/peter-pan-swift-ios-class/%E8%AA%BF%E8%89%B2%E5%A4%A7%E5%B8%AB-%E5%90%84%E7%A8%AEkitty%E7%9A%84%E8%A1%A3%E6%9C%8D%E9%A1%8F%E8%89%B2-73505fd31329?source=rss-3ad42f647d9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/73505fd31329</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[吳洺葍]]></dc:creator>
            <pubDate>Mon, 30 Jul 2018 09:20:38 GMT</pubDate>
            <atom:updated>2018-07-30T09:25:23.368Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>學習目的：<br>-熟練 outlet，action，UISlider, UIColor<br>-switch開關控制Slider是否能操作</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*8Ctu9Bd6h3CCvZ3Isoe-QQ.gif" /></figure><ol><li>需要大量的outlet，每個物件都要拉以用來給action使用</li><li>拉兩個action，分別是UISlider、UISwitch</li><li>這裡可以將每個Slider拉給同一個action，Switch同樣可以</li><li>在action裡利用<strong>switch sender{}</strong>可以區別每個UI</li></ol><blockquote>switch開關slider</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*u8xt6ZSp7IeucDN4PXSCPw.png" /></figure><p>可以看我GitHub參考</p><p>GitHub:</p><p><a href="https://github.com/WuMinFu/ColorChangeApp/blob/master/ColorChangeApp/ViewController.swift">WuMinFu/ColorChangeApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73505fd31329" 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-%E5%90%84%E7%A8%AEkitty%E7%9A%84%E8%A1%A3%E6%9C%8D%E9%A1%8F%E8%89%B2-73505fd31329">調色大師：各種Kitty的衣服顏色</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>