Created
June 19, 2013 05:23
-
-
Save mikelovesrobots/5811851 to your computer and use it in GitHub Desktop.
Just because Apple/Objective-C wants you to put everything in one goddamn file doesn't mean you actually have to have it all in one file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MapViewController.m | |
// placesihavepooped | |
// | |
// Created by Michael Judge on 6/16/13. | |
// Copyright (c) 2013 Michael Judge. All rights reserved. | |
// | |
#import "MapViewController.h" | |
@implementation MapViewController | |
@synthesize mkMapView; | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
dropMarkerAction = [[DropMarkerAction alloc] init]; | |
shareAction = [[ShareAction alloc] init]; | |
initialZoomAction = [[InitialZoomAction alloc] init]; | |
annotationViewGenerator = [[AnnotationViewGenerator alloc] init]; | |
} | |
- (IBAction)bombsAwayAction:(id)sender { | |
[dropMarkerAction activate:mkMapView]; | |
} | |
- (IBAction)shareAction:(id)sender { | |
[shareAction activate:self]; | |
} | |
- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation { | |
[initialZoomAction activate:mapView andLocation:userLocation]; | |
} | |
- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation | |
{ | |
return [annotationViewGenerator generate:mapView viewForAnnotation:annotation]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment