在MapBox的路线Me中,
@implementation RMMapView
{
BOOL _delegateHasBeforeMapMove;
BOOL _delegateHasAfterMapMove;
BOOL _delegateHasBeforeMapZoom;
BOOL _delegateHasAfterMapZoom;
BOOL _delegateHasMapViewRegionDidChange;
BOOL _delegateHasDoubleTapOnMap;
BOOL _delegateHasSingleTapOnMap;
BOOL _delegateHasSingleTapTwoFingersOnMap;
BOOL _delegateHasLongSingleTapOnMap;
BOOL _delegateHasTapOnAnnotation;
BOOL _delegateHasDoubleTapOnAnnotation;
BOOL _delegateHasTapOnLabelForAnnotation;
BOOL _delegateHasDoubleTapOnLabelForAnnotation;
BOOL _delegateHasShouldDragMarker;
BOOL _delegateHasDidDragMarker;
BOOL _delegateHasDidEndDragMarker;
BOOL _delegateHasLayerForAnnotation;
BOOL _delegateHasWillHideLayerForAnnotation;
BOOL _delegateHasDidHideLayerForAnnotation;
BOOL _constrainMovement;
RMProjectedRect _constrainingProjectedBounds;
float _lastZoom;
CGPoint _lastContentOffset, _accumulatedDelta;
BOOL _mapScrollViewIsZooming;
}
That is, it s declared in the .m files instead of the .h files. If I sub-class this RMMapView, I don t see these iVars. Is there a way to make it visible in subclass while not to the world?
我打算保留原代码,然后选择子分类,从那里修改行为。但也许直接修改文件,通过 Git 更新主仓库的代码是更好的方法。