My app has a need to implement a map in two seperate UIViewController
's, the problem is that once one of the maps has been rendered, trying to open the second causes a EXC_BAD_ACCESS
error that shows at the declaration of AppDelegate, I have tried using Zombies and it shows nothing, tried Analyzing, again shows nothing, I have tried presenting the maps in a variety of ways, Including: programatically presentViewController()
, as well as having a mapkit in each .storyboard and using containerViews that embed a map.storyboard which only contains a mapkit.
typing bt in the console gives me this:
libglInterpose.dylib`EAGLContext_renderbufferStorageFromDrawable(EAGLContext*, objc_selector*, unsigned int, id) + 204, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x69725659)
Im using Xcode7-Beta5 and Swift, any help other possible debug methods, or some way to manage the maps more efficiently, would be greatly appreciated.
MapViewController.swift (Doesn't do anything yet, since i can't get them to both render)
import UIKit
import MapKit
class MapViewController: UIViewController {
@IBOutlet weak var mapView: MKMapView!
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
EDIT:
ok, so the hierarchy goes somewhat like this:
I have a UITabBarController
, one of the tabs is a map, from another tab there is a view hierarchy that eventually leads to a button that presents another map.
I was able to get both maps rendering by placing my instance of Map.storyboard within my TabBarController subclass, then using UIContainerView
s on both my UIViewController
s that should have the map and adding a child ViewController (map from TabBarController) and its view to the ViewContainer