久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='7FRN6'><tr id='7FRN6'><dt id='7FRN6'><q id='7FRN6'><span id='7FRN6'><b id='7FRN6'><form id='7FRN6'><ins id='7FRN6'></ins><ul id='7FRN6'></ul><sub id='7FRN6'></sub></form><legend id='7FRN6'></legend><bdo id='7FRN6'><pre id='7FRN6'><center id='7FRN6'></center></pre></bdo></b><th id='7FRN6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7FRN6'><tfoot id='7FRN6'></tfoot><dl id='7FRN6'><fieldset id='7FRN6'></fieldset></dl></div>
  • <legend id='7FRN6'><style id='7FRN6'><dir id='7FRN6'><q id='7FRN6'></q></dir></style></legend>

      <tfoot id='7FRN6'></tfoot>
          <bdo id='7FRN6'></bdo><ul id='7FRN6'></ul>
      1. <small id='7FRN6'></small><noframes id='7FRN6'>

        如何在iOS中從經度和緯度識別時區

        How to identify timezone from longitude and latitude in iOS(如何在iOS中從經度和緯度識別時區)
        <tfoot id='F91aP'></tfoot>

        <small id='F91aP'></small><noframes id='F91aP'>

              <tbody id='F91aP'></tbody>

          • <i id='F91aP'><tr id='F91aP'><dt id='F91aP'><q id='F91aP'><span id='F91aP'><b id='F91aP'><form id='F91aP'><ins id='F91aP'></ins><ul id='F91aP'></ul><sub id='F91aP'></sub></form><legend id='F91aP'></legend><bdo id='F91aP'><pre id='F91aP'><center id='F91aP'></center></pre></bdo></b><th id='F91aP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='F91aP'><tfoot id='F91aP'></tfoot><dl id='F91aP'><fieldset id='F91aP'></fieldset></dl></div>

                <legend id='F91aP'><style id='F91aP'><dir id='F91aP'><q id='F91aP'></q></dir></style></legend>
                  <bdo id='F91aP'></bdo><ul id='F91aP'></ul>
                  本文介紹了如何在iOS中從經度和緯度識別時區的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  如何找出給定的經度和緯度屬于哪個 NSTimeZone?

                  How can I find out which NSTimeZone a given longitude and latitude fall in?

                  推薦答案

                  我試過 APTimeZones 庫.就我而言,我需要時區以及來自特定城市緯度的國家名稱.我通過圖書館了解它是如何工作的.它實際上有一個 JSON 格式的文件,其中包含所有時區及其相應的經緯度.它將 lat long 作為輸入并循環通過此 JSON 文件,比較所有時區的 lat long 與輸入 lat long 的距離.它返回與輸入 lat long 距離最短的時區.

                  I have tried APTimeZones library. In my case I needed Timezone as well as country name from the lat long of a particular city. I went through the library to know how it works. It actually has a file in JSON format which has all the timezones along with their corresponding lat longs. it takes the lat long as input and loops through this JSON file comparing the distances of all the timezone's lat long from the input lat long. It returns the time zone which has shortest distance from the input lat long.

                  但問題是對于一個大國邊境的城市,它返回給我鄰國的時區,因為我也從中提取了國家代碼,所以我得到了鄰國.

                  But the problem was for a city in the border of a big country, it returned me the timezone of neighbouring country, as I also extracted the country code from it, I got the neighbouring country.

                  所以在這種情況下,Apple 的原生框架非常好.

                  So Apple's native framework is far good in this case.

                  下面的代碼對我很有效.

                  And the below code worked for me well.

                  CLLocation *location = [[CLLocation alloc] initWithLatitude:your_latitude longitude:your_longitude];
                  CLGeocoder *geoCoder = [[CLGeocoder alloc]init];
                  [geoCoder reverseGeocodeLocation: location completionHandler:^(NSArray *placemarks, NSError *error)
                  {
                  CLPlacemark *placemark = [placemarks objectAtIndex:0];
                  NSLog(@"Timezone -%@",placemark.timeZone);
                  
                  //And to get country name simply.
                  NSLog(@"Country -%@",placemark.country);
                  
                  }];
                  

                  在 Swift 中

                  let location = CLLocation(latitude: your_latitude, longitude: your_longitude)
                  let geoCoder = CLGeocoder()
                  geoCoder.reverseGeocodeLocation(location) { (placemarks, err) in
                       if let placemark = placemarks?[0] {
                            print(placemark.timeZone)
                            print(placemark.country)
                       }
                  }
                  

                  這篇關于如何在iOS中從經度和緯度識別時區的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                    <tfoot id='e8z5U'></tfoot>
                      <bdo id='e8z5U'></bdo><ul id='e8z5U'></ul>

                      • <small id='e8z5U'></small><noframes id='e8z5U'>

                        <i id='e8z5U'><tr id='e8z5U'><dt id='e8z5U'><q id='e8z5U'><span id='e8z5U'><b id='e8z5U'><form id='e8z5U'><ins id='e8z5U'></ins><ul id='e8z5U'></ul><sub id='e8z5U'></sub></form><legend id='e8z5U'></legend><bdo id='e8z5U'><pre id='e8z5U'><center id='e8z5U'></center></pre></bdo></b><th id='e8z5U'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='e8z5U'><tfoot id='e8z5U'></tfoot><dl id='e8z5U'><fieldset id='e8z5U'></fieldset></dl></div>

                        <legend id='e8z5U'><style id='e8z5U'><dir id='e8z5U'><q id='e8z5U'></q></dir></style></legend>

                              <tbody id='e8z5U'></tbody>
                          • 主站蜘蛛池模板: 欧美精品99久久久 | 国产高清一区 | 婷婷色av | 91久色| 欧美成人黄色 | 欧洲色综合| 怡红院久久 | 国产一级片在线 | 中文字幕av一区二区三区谷原希美 | 久久青草视频 | 欧美日本国产 | av免费在线观看网站 | 国产又粗又大又爽 | 久久黄色大片 | 日韩精品成人免费观看视频 | 可以在线观看的av | 日本色婷婷 | 国产a区 | 中文字幕在线免费看 | 亚洲小视频 | 日韩在线精品 | 性欧美69 | 亚洲一区二区免费视频 | 一级片在线视频 | 欧美激情久久久 | 日韩av手机在线 | 亚洲一区二区在线 | 色综合88| 久久国产精品免费 | 黑人操亚洲女人 | 免费一级片 | 无遮挡在线观看 | 国内精品偷拍 | 精品一区久久 | 国产在线一| 精品日韩在线 | 日韩看片 | 亚洲天堂2014| 又色又爽又黄18网站 | 国产精品久久久久久久久久久久久 | 久久在线 |