B4X:
//this not work
//in .h
//b4i throw error when compile :
//B4i line: *
//mv.showmyloc=True
//no visible @interface for 'iAMap' declares the selector 'setshowmyloc:'
@property (nonatomic,assign)BOOL showmyloc;
//in .m
-(BOOL)showmyloc{
return [_mapView isShowsUserLocation];
}
-(void)setShowmyloc:(BOOL)showMyLoc{
[_mapView setShowsUserLocation:showMyLoc];
[_mapView setUserTrackingMode:MAUserTrackingModeFollow];
}
//in .m(gen by b4i)
[self._mv setshowmyloc:[self.__c True]];
//the right way should be:
[self._mv setShowmyloc:[self.__c True]];
//no error with getter
B4X:
//this will work
//in .h
@property (nonatomic,assign)BOOL SHOWSCALE;
//in .m
-(BOOL)SHOWSCALE{
return [_mapView showsScale];
}
-(void)setSHOWSCALE:(BOOL)SHOWSCALE{
[_mapView setShowsScale:SHOWSCALE];
}
//in .m(gen by b4i)
[self._mv setSHOWSCALE:[self.__c True]];