开发者

MyViewController may not respond to setMapView

My view controller's name is RouteToStationViewController, in this view controller I got a warning when I tried to compile and that caused a crash later, my relevant code is:

- (void)loadView {
    [self setMapView:[[[RMMapView alloc]initWithFrame:CGRectMake(0.0, 0.0, 700, 700)]autorelease]]; //this line cause warning

    [mapView2 setBackgroundColor:[UIColor blackColor]];
    self.view = mapView2;

}

The warning I got is:

warning开发者_如何学C: 'RouteToStationViewController' may not respond to '-setMapView:'


I could be wrong but if your synthesizing mapView2, wouldn't the appropiate set function be:

[self setMapView2:args];


Do you have a property for the map set up in your .h

property(nonamtoic, retain) id* mapView;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜