I have an iOS app using the MapKit framework.
The app works fine except that when I go to debug the UI in Xcode using the
Debug View Hierarchy
I have an MKScrollContainerView
entirely displaced
(as shown in the attached screenshot).
Any idea on how to fix that MKScrollContainerView
odd positioning, that makes UI flipping and twisting almost impossible?
Update 1
I tested the UI with the Reveal app and a similar issue is present.
Update 2
I tried implementing the entire app UI with a Storyboard in InterfaceBuilder and programmatically, with the same result.
class MainViewController: UITabBarController {
override func loadView() {
super.loadView()
...
self.viewControllers = [Tab1ViewController(), ...]
}
class Tab1ViewController: UINavigationController {
override func loadView() {
super.loadView()
...
self.pushViewController(MapViewController(), animated: false)
}
}
class MapViewController: UIViewController {
override func loadView() {
super.loadView()
let mapView = MKMapView()
mapView.frame = self.view.frame
self.view.addSubview(mapView)
}
Composition:
UITabBarController
-> UINavigationController
-> UIViewController (MapViewController)
-> MKMapView