开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜