objective c - iOS MkMapView blank after moving to Xcode 6 -
objective c - iOS MkMapView blank after moving to Xcode 6 -
i have apps created in xcode 5 mkmapview working well. created new app in xcode 6.1 , dragged old storyboard scenes , view controllers new app. map view shows blank screen , no annotations on ios 7 worked on ios 8. added button , map view blank on ios 8 well. deleted , recreated view in storyboard map view within view within view controller dragging object templates. map still blank. after debugging see regionwillchangeanimated , regiondidchangeanimated show repeated setregion events set part 0.0 coordinates (before , after set right region).
finally removed mkmapview storyboard view , created using code.
//create map view _mkmapview = [[mkmapview alloc] initwithframe:self.view.frame]; _mkmapview.maptype = mkmaptypesatellite; _mkmapview.delegate = self; [self.view addsubview:_mkmapview]; [self.view setautoresizingmask:uiviewautoresizingflexiblewidth|uiviewautoresizingflexibleheight]; self.view.alpha = 1.0; _mkmapview.maptype = mkmaptypestandard; _mkmapview.pitchenabled = no; //set me map delegate _mkmapview.delegate = self;
the 0 setregion events not appear & map works ok. there in storyboard should setting? why storyboard created view causing repeated setregion events 0 coordinates?
it sounds problem constraints when creating map view in storyboard. had no size constraints map 0 size part 0 size.
the map never "blank"; missing entirely. object insufficient (ambiguous) constraints cannot drawn. chance ever worked; unfortunately, ambiguous constraints not cause error message, , runtime resolve ambiguity in way causes view appear, thought okay when wasn't. problem exposed.
ios objective-c iphone xcode mkmapview
Comments
Post a Comment