Permalink
Browse files

Added map view controller

  • Loading branch information...
1 parent 36fa605 commit 31197b06218bfb736be27f21f03334e5ab342184 @blacker committed Apr 21, 2012
View
@@ -0,0 +1,22 @@
+//
+// MapAppDelegate.h
+// Map
+//
+// Created by Benjamin Lacker on 4/20/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class STFirstViewController;
+
+@interface MapAppDelegate : NSObject <UIApplicationDelegate> {
+ UIWindow *window;
+ STFirstViewController *viewController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet STFirstViewController *viewController;
+
+@end
+
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+ <FileBreakpoints>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ isPathRelative = "1"
+ filePath = "Sethoscope/STFirstViewController.h"
+ timestampString = "356725233.296126"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "13"
+ endingLineNumber = "13"
+ landmarkName = "@interface STFirstViewController"
+ landmarkType = "2">
+ </FileBreakpoint>
+ </FileBreakpoints>
+</Bucket>
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8DCBD62515432E0200F72E61"
+ BuildableName = "Sethoscope.app"
+ BlueprintName = "Sethoscope"
+ ReferencedContainer = "container:Sethoscope.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8DCBD62515432E0200F72E61"
+ BuildableName = "Sethoscope.app"
+ BlueprintName = "Sethoscope"
+ ReferencedContainer = "container:Sethoscope.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8DCBD62515432E0200F72E61"
+ BuildableName = "Sethoscope.app"
+ BlueprintName = "Sethoscope"
+ ReferencedContainer = "container:Sethoscope.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8DCBD62515432E0200F72E61"
+ BuildableName = "Sethoscope.app"
+ BlueprintName = "Sethoscope"
+ ReferencedContainer = "container:Sethoscope.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Sethoscope.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>8DCBD62515432E0200F72E61</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
@@ -0,0 +1,85 @@
+//
+// MapAppDelegate.m
+// Map
+//
+// Created by Benjamin Lacker on 4/20/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "MapAppDelegate.h"
+#import "STFirstViewController.h"
+
+@implementation MapAppDelegate
+
+@synthesize window;
+@synthesize viewController;
+
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ // Add the view controller's view to the window and display.
+ [self.window addSubview:viewController.view];
+ [self.window makeKeyAndVisible];
+
+ return YES;
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ /*
+ Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
+ */
+}
+
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ /*
+ Called when the application is about to terminate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ /*
+ Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+ */
+}
+
+
+- (void)dealloc {
+}
+
+
+@end
@@ -0,0 +1,24 @@
+//
+// MapViewAnnotation.h
+// Map
+//
+// Created by Benjamin Lacker on 4/20/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <MapKit/MapKit.h>
+
+@interface MapViewAnnotation : NSObject <MKAnnotation> {
+
+ NSString *title;
+ CLLocationCoordinate2D coordinate;
+
+}
+
+@property (nonatomic, copy) NSString *title;
+@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
+
+- (id)initWithTitle:(NSString *)ttl andCoordinate:(CLLocationCoordinate2D)c2d;
+
+@end
@@ -0,0 +1,27 @@
+//
+// MapViewAnnotation.m
+// Map
+//
+// Created by Benjamin Lacker on 4/20/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "MapViewAnnotation.h"
+
+@implementation MapViewAnnotation
+
+@synthesize title, coordinate;
+
+- (id)initWithTitle:(NSString *)ttl andCoordinate:(CLLocationCoordinate2D)c2d {
+ [super init];
+ title = ttl;
+ coordinate = c2d;
+ return self;
+}
+
+- (void)dealloc {
+ [title release];
+ [super dealloc];
+}
+
+@end
@@ -0,0 +1,21 @@
+//
+// MapViewController.h
+// Map
+//
+// Created by Benjamin Lacker on 4/20/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <MapKit/MapKit.h>
+
+@interface MapViewController : UIViewController <MKMapViewDelegate> {
+
+ MKMapView *mapView;
+
+}
+
+@property (nonatomic, retain) IBOutlet MKMapView *mapView;
+
+@end
+
Oops, something went wrong.

0 comments on commit 31197b0

Please sign in to comment.