2

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?

Xcode view debugging


Update 1

I tested the UI with the Reveal app and a similar issue is present.

Reveal view inspection


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
Daniele Orlando
  • 2,692
  • 3
  • 23
  • 26
  • If your code is running fine I would not worry about it. It could just be an Xcode bug. – Trip Phillips Oct 16 '15 at 05:51
  • The problem arrives when I go to debug the UI, the perspective 3D camera uses as anchor point the middle of the two windows. This has the side effect that when I try to rate my app window, instead of rotating around itself, it rotates around the the middle of the two windows, making impossible to flip or twist the UI. – Daniele Orlando Oct 16 '15 at 15:50

0 Answers0