Skip to content

Commit

Permalink
add some properties to the map controller
Browse files Browse the repository at this point in the history
  • Loading branch information
alinradut committed Mar 23, 2011
1 parent 0b51cfe commit be86ebd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
9 changes: 9 additions & 0 deletions Classes/RCLMapController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@
@interface RCLMapController : UIViewController <MKMapViewDelegate> {
MKMapView *mapView_;
NSMutableArray *pins_;
NSMutableArray *dataSource_;

NSString *latitudeKey_;
NSString *longitudeKey_;
NSString *nameKey_;
}

@property (nonatomic, retain) IBOutlet MKMapView *mapView;
@property (nonatomic, retain) NSMutableArray *pins;
@property (nonatomic, retain) NSMutableArray *dataSource;
@property (nonatomic, retain) NSString *latitudeKey;
@property (nonatomic, retain) NSString *longitudeKey;
@property (nonatomic, retain) NSString *nameKey;

@end
14 changes: 8 additions & 6 deletions Classes/RCLMapController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ @implementation RCLMapController
@synthesize mapView = mapView_;
@synthesize pins = pins_;

/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
@synthesize latitudeKey = latitudeKey_;
@synthesize longitudeKey = longitudeKey_;
@synthesize nameKey = nameKey_;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
// Custom initialization
self.latitudeKey = @"latitude";
self.longitudeKey = @"longitude";
self.nameKey = @"name";
}
return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
Expand All @@ -31,8 +34,7 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
if (mapView_ == nil) {
mapView_ = [[MKMapView alloc] initWithFrame:self.view];
mapView_.delegate = self;

}
self.pins = [NSMutableArray array];

Expand Down

0 comments on commit be86ebd

Please sign in to comment.