MKMapView - NSUnknowKeyException
I want to use MKMapView
with UITabbarController
. I havent any problems with other viewController application. But if i use MKMapView
with UITabBarContro开发者_如何学Goller
, 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.
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
精彩评论