

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GPS &#8211; Max的程式語言筆記</title>
	<atom:link href="https://stackoverflow.max-everyday.com/tag/gps/feed/" rel="self" type="application/rss+xml" />
	<link>https://stackoverflow.max-everyday.com</link>
	<description>我要當一個豬頭，快樂過每一天</description>
	<lastBuildDate>Tue, 29 Aug 2017 01:50:48 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://stackoverflow.max-everyday.com/wp-content/uploads/2017/02/max-stackoverflow-256.png</url>
	<title>GPS &#8211; Max的程式語言筆記</title>
	<link>https://stackoverflow.max-everyday.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[iOS] Gps Loction</title>
		<link>https://stackoverflow.max-everyday.com/2017/08/ios-gps-loction/</link>
					<comments>https://stackoverflow.max-everyday.com/2017/08/ios-gps-loction/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 28 Aug 2017 09:02:27 +0000</pubDate>
				<category><![CDATA[iOS筆記]]></category>
		<category><![CDATA[GPS]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=1183</guid>

					<description><![CDATA[iOS 取得 GPS info sample  ...]]></description>
										<content:encoded><![CDATA[<p>iOS 取得 GPS info sample  如下：<br />
<a href="https://github.com/lukemaeda/GpsLocation">https://github.com/lukemaeda/GpsLocation</a></p>
<p>詳全文：<br />
<a href="https://iscene.jimdo.com/2015/06/26/objective-c-%E7%B7%AF%E5%BA%A6-%E7%B5%8C%E5%BA%A6-%E5%8F%96%E5%BE%97/">https://iscene.jimdo.com/2015/06/26/objective-c-%E7%B7%AF%E5%BA%A6-%E7%B5%8C%E5%BA%A6-%E5%8F%96%E5%BE%97/</a></p>
<p>執行畫面：</p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-1184" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/1435309999.png" alt="" width="475" height="800" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/1435309999.png 475w, https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/1435309999-356x600.png 356w" sizes="(max-width: 475px) 100vw, 475px" /></p>
<p>&nbsp;</p>
<p>執行時輸出的debug message:</p>
<pre>2017-08-28 16:49:40.719220+0800 GpsLocation[19707:2486770] 緯度 +24.796028, 経度 +120.982199</pre>
<hr />
<p>Info.plist</p>
<p>要加這2組：</p>
<pre>&lt;key&gt;NSLocationAlwaysUsageDescription&lt;/key&gt;
&lt;string&gt;位置情報に常に使われます。&lt;/string&gt;
&lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;
&lt;string&gt;情報を通知するために使用します。&lt;/string&gt;</pre>
<p>&nbsp;</p>
<p>加完的畫面：</p>
<p><img decoding="async" class="alignnone size-full wp-image-1185" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/Screenshot-2017-08-28-16.59.31.jpg" alt="" width="800" height="447" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/Screenshot-2017-08-28-16.59.31.jpg 800w, https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/Screenshot-2017-08-28-16.59.31-600x335.jpg 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2017/08/Screenshot-2017-08-28-16.59.31-768x429.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></p>
<p>&nbsp;</p>
<p>主程式：ViewController.m</p>
<div id="cc-m-9786681979" class="j-module n j-text ">
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #d12f1b;"><span style="font-variant-ligatures: no-common-ligatures; color: #78492a;">#import</span> &#8220;ViewController.h&#8221;</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #d12f1b;"><span style="font-variant-ligatures: no-common-ligatures; color: #78492a;">#import </span> &lt;CoreLocation/CoreLocation.h&gt;</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">@interface</span> <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">ViewController</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">() &lt;</span>CLLocationManagerDelegate<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">&gt;</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">@property</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">nonatomic</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">retain</span>) <span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">CLLocationManager</span> *locationManager;</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">// <span style="font-family: 'Hiragino Kaku Gothic ProN';">緯度</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #bb2ca2;">@property <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">(</span>weak<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">,</span> nonatomic<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">)</span> IBOutlet <span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">UILabel</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">*labelLatitude;</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">// <span style="font-family: 'Hiragino Kaku Gothic ProN';">経度</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #bb2ca2;">@property <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">(</span>weak<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">,</span> nonatomic<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">)</span> IBOutlet <span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">UILabel</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">*labelLongitude;</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">// <span style="font-family: 'Hiragino Kaku Gothic ProN';">時間</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #bb2ca2;">@property <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">(</span>weak<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">,</span> nonatomic<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">)</span> IBOutlet <span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">UILabel</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">*labelTime;</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #bb2ca2;">@end</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">@implementation</span> ViewController</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">&#8211; (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">void</span>)viewDidLoad {</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #3d1d81;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">    [</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">super</span> viewDidLoad<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // Do any additional setup after loading the view, typically from a nib.</p>
<p style="font-size: 11px; line-height: normal; font-family: 'Hiragino Kaku Gothic ProN'; color: #008400;"><span style="font-family: Menlo; color: #000000;">   </span> <span style="font-family: Menlo;">//</span> ユーザから位置情報の利用について承認</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #4f8187;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">nil</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">==</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>locationManager<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">) {</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">         <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">locationManager</span> = [[<span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">CLLocationManager</span> <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">alloc</span>] <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">init</span>];</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">       </span> // iOS 8<span style="font-family: 'Hiragino Kaku Gothic ProN';">以上</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #3d1d81;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">       </span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">([[[</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">UIDevice</span> currentDevice<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">]</span> systemVersion<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">]</span> floatValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">] &gt;=</span> <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8;">8.0</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">) {</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">           </span> // NSLocationWhenInUseUsageDescription<span style="font-family: 'Hiragino Kaku Gothic ProN';">に設定したメッセージでユーザに確認</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #3d1d81;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">            [</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">locationManager</span> requestWhenInUseAuthorization<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">           </span> // NSLocationAlwaysUsageDescription<span style="font-family: 'Hiragino Kaku Gothic ProN';">に設定したメッセージでユーザに確認</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">           </span> //[locationManager requestAlwaysAuthorization];</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">        }</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">    }</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #4f8187;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">nil</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">==</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>locationManager<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">)</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">        <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">locationManager</span> = [[<span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">CLLocationManager</span> <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">alloc</span>] <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">init</span>];</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #4f8187;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>locationManager<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">delegate</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">=</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">;</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // <span style="font-family: 'Hiragino Kaku Gothic ProN';">更新間隔は</span>distanceFilter<span style="font-family: 'Hiragino Kaku Gothic ProN';">プロパティ</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> //self.locationManager.distanceFilter = 500;</p>
<p style="font-size: 11px; line-height: normal; font-family: 'Hiragino Kaku Gothic ProN'; color: #008400;"><span style="font-family: Menlo; color: #000000;">   </span> <span style="font-family: Menlo;">//</span> 情報の更新を開始すれば、位置情報を取得</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #3d1d81;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">    [</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">locationManager</span> startUpdatingLocation<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">}</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">&#8211; (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">void</span>)didReceiveMemoryWarning {</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #3d1d81;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">    [</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">super</span> didReceiveMemoryWarning<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // Dispose of any resources that can be recreated.</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">}</p>
<p style="font-size: 11px; line-height: normal; font-family: 'Hiragino Kaku Gothic ProN'; color: #008400;"><span style="font-family: Menlo;">// GPS</span>で位置情報の更新があったときに呼ばれる</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">&#8211; (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">void</span>)locationManager:(<span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">CLLocationManager</span> *)manager didUpdateLocations:(<span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">NSArray</span>*)locations {</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">    <span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">CLLocation</span>* location = [locations <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">lastObject</span>];</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // <span style="font-family: 'Hiragino Kaku Gothic ProN';">時間</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">    <span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">NSDate</span>* timestamp = location.<span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">timestamp</span>;</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">    </span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">NSLog</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;">@&#8221;</span><span style="font-family: 'Hiragino Kaku Gothic ProN'; color: #d12f1b;">緯度</span> <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;">%+.6f,</span> <span style="font-family: 'Hiragino Kaku Gothic ProN'; color: #d12f1b;">経度</span> <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;">%+.6f\n&#8221;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">, location.</span>coordinate<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>latitude<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">,</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">                                      location.</span>coordinate<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>longitude<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">);</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // <span style="font-family: 'Hiragino Kaku Gothic ProN';">緯度</span> %+.6f</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">labelLatitude</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>text <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">= [</span>NSString <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">stringWithFormat</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">:</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;">@&#8221;%+.6f&#8221;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">,  </span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">                                        location.</span>coordinate<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>latitude<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // <span style="font-family: 'Hiragino Kaku Gothic ProN';">経度</span> %+.6f</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">labelLongitude</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>text <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">= [</span>NSString <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">stringWithFormat</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">:</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;">@&#8221;%+.6f&#8221;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">,</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">                                        location.</span>coordinate<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">.</span>longitude<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> // <span style="font-family: 'Hiragino Kaku Gothic ProN';">日時時間</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #703daa;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">   </span> NSDateFormatter <span style="font-variant-ligatures: no-common-ligatures; color: #000000;">*df = [[</span>NSDateFormatter <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">alloc</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">]</span> <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">init</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #d12f1b;"><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">    [df</span> <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">setDateFormat</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000;">:</span>@&#8221;yyyy/MM/dd HH:mm:ss&#8221;<span style="font-variant-ligatures: no-common-ligatures; color: #000000;">];</span></p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">    <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2;">self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">labelTime</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #703daa;">text</span> = [df <span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81;">stringFromDate</span>:timestamp];</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo;">}</p>
<p style="font-size: 11px; line-height: normal; font-family: Menlo; color: #bb2ca2;">@end</p>
</div>
<div id="cc-m-9786682179" class="j-module n j-spacing "></div>
<div id="cc-m-9786682279" class="j-module n j-text ">
<p><span style="color: #999999; font-family: arial, sans-serif; font-size: small; line-height: normal; widows: 1;">GitHub </span><a title="https://github.com/lukemaeda/GpsLocation" href="https://github.com/lukemaeda/GpsLocation" target="_blank" rel="noopener"><span style="color: #0000ff;"><span style="font-family: arial, sans-serif; font-size: small; line-height: normal; widows: 1;">GpsLocation</span></span></a></p>
</div>
<hr />
<p>相關文章：</p>
<p>http://dev.classmethod.jp/smartphone/ios-locationmanager/</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2017/08/ios-gps-loction/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
