abayrakli
abayrakli

Reputation: 11

MKMapView - NSUnknowKeyException

I want to use MKMapView with UITabbarController. I havent any problems with other viewController application. But if i use MKMapView with UITabBarController, MKMapView IBOutlet throws NSUnknownKeyException with message "this class is not key value coding-compliant for the key xxxx"

If i delete IBOutlet from my code and IB then application runs fine. If i set a IBOutlet for MKMapView application throws this exception.

Upvotes: 1

Views: 2353

Answers (1)

Fred
Fred

Reputation: 11

On the TabBarController change the UIViewController that will display your map to match:

@interface MyMapViewController {
 MKMapView *mapView;
}
@property (nonatomic,retain) IBOutlet MKMapView *mapView;

On your tab bar controller use the inspector to change the class from UIViewController to MyMapViewController

Upvotes: 1

Related Questions