In xcode 9 with iOS 11 - issue with loading of Map tiles on first run

前端 未结 4 2104
孤城傲影
孤城傲影 2021-02-13 12:53

--Updated with new findings -- Tested in both simulator and on device. Maps are not loaded correctly when the app is run from a cold start. Tiles are not being displayed.

<
4条回答
  •  臣服心动
    2021-02-13 13:35

    I had exactly same problem, spent a lot of time to find a solution and finally I did. So in my case problem was with wrong inisializing. Usually you would write let mapView = MKMapView() on the top of the viewController and then customise it somewhere later inside viewDidLoad but after IOS 11 Beta 1 it stopped working. I fixed it by changing to var mapView: MKMapView? on the top of the viewController and then inside viewDidLoad I inisializ it like mapView = MKMapView(). Hope it helps someone! :)

提交回复
热议问题