Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. # MapView.m ...
  2. @implementation MapView
  3.  
  4. - (id) initWithFrame:(CGRect)frame {
  5. if (self = [super initWithFrame:frame]) {
  6.  
  7. // [self setShowsUserLocation:YES];
  8.  
  9. [self setDelegate:[[MapDelegate alloc] initWithMapView:self]];
  10.  
  11. # MapDelegate.m ...
  12. - (id)initWithMapView:(MapView *)aMapView {
  13. self = [super init];
  14. self.mapView = aMapView;
  15. return self;
  16. }
  17.  
  18. @property (strong) id delegateContainer;
  19. ....
  20. [self setDelegateContainer:[[MapDelegate alloc] init]];
  21. [self setDelegate:self.delegateContainer];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement