Skip to content

Commit

Permalink
first push of test harness build for the map view
Browse files Browse the repository at this point in the history
  • Loading branch information
lbdl committed May 29, 2011
1 parent 22de0b7 commit d324b98
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 5 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
build

#*.xcodeproj/*
!*.xcodeproj/project.pbxproj
*.DS_Store

§# Below from https://github.com/myell0w/MTStatusBarOverlay/blob/master/.gitignore

*.pbxuser
*.mode1v3
*.mode2v3
!default.pbxuser
!default.mode1v3
!default.mode2v3

# Xcode 4
*.xcworkspace
xcuserdata
*.xcuserdatad

49 changes: 46 additions & 3 deletions sukey_mapView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,42 @@
2B3ED2AB1392851D0031D254 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3ED2AA1392851D0031D254 /* main.m */; };
2B3ED2AE1392851D0031D254 /* sukey_mapViewAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3ED2AD1392851D0031D254 /* sukey_mapViewAppDelegate.m */; };
2B3ED2B11392851D0031D254 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2B3ED2AF1392851D0031D254 /* MainWindow.xib */; };
2B3ED2BA1392A8AE0031D254 /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3ED2B91392A8AE0031D254 /* MapViewController.m */; };
2B3ED2BC1392A9C60031D254 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B3ED2BB1392A9C60031D254 /* CoreLocation.framework */; };
2B3ED2BE1392A9CF0031D254 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B3ED2BD1392A9CF0031D254 /* MapKit.framework */; };
2BD2B9751392C05A0023E1EF /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = 2BD2B9721392C05A0023E1EF /* background.png */; };
2BD2B9761392C05A0023E1EF /* speechbubble.png in Resources */ = {isa = PBXBuildFile; fileRef = 2BD2B9731392C05A0023E1EF /* speechbubble.png */; };
2BD2B9771392C05A0023E1EF /* sukeybutton.png in Resources */ = {isa = PBXBuildFile; fileRef = 2BD2B9741392C05A0023E1EF /* sukeybutton.png */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
2B3ED2991392851D0031D254 /* sukey_mapView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sukey_mapView.app; sourceTree = BUILT_PRODUCTS_DIR; };
2B3ED29D1392851D0031D254 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
2B3ED29F1392851D0031D254 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
2B3ED2A11392851D0031D254 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
2B3ED2A51392851D0031D254 /* sukey_mapView-Info.plist */ = {isa = PBXFileReference; path = "sukey_mapView-Info.plist"; sourceTree = "<group>"; };
2B3ED2A51392851D0031D254 /* sukey_mapView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sukey_mapView-Info.plist"; sourceTree = "<group>"; };
2B3ED2A71392851D0031D254 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
2B3ED2A91392851D0031D254 /* sukey_mapView-Prefix.pch */ = {isa = PBXFileReference; path = "sukey_mapView-Prefix.pch"; sourceTree = "<group>"; };
2B3ED2A91392851D0031D254 /* sukey_mapView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "sukey_mapView-Prefix.pch"; sourceTree = "<group>"; };
2B3ED2AA1392851D0031D254 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
2B3ED2AC1392851D0031D254 /* sukey_mapViewAppDelegate.h */ = {isa = PBXFileReference; path = sukey_mapViewAppDelegate.h; sourceTree = "<group>"; };
2B3ED2AC1392851D0031D254 /* sukey_mapViewAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sukey_mapViewAppDelegate.h; sourceTree = "<group>"; };
2B3ED2AD1392851D0031D254 /* sukey_mapViewAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = sukey_mapViewAppDelegate.m; sourceTree = "<group>"; };
2B3ED2B01392851D0031D254 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = "<group>"; };
2B3ED2B81392A8AE0031D254 /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewController.h; sourceTree = "<group>"; };
2B3ED2B91392A8AE0031D254 /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapViewController.m; path = ../../sukey/MapViewController.m; sourceTree = "<group>"; };
2B3ED2BB1392A9C60031D254 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
2B3ED2BD1392A9CF0031D254 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
2BD2B9721392C05A0023E1EF /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = background.png; sourceTree = "<group>"; };
2BD2B9731392C05A0023E1EF /* speechbubble.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = speechbubble.png; sourceTree = "<group>"; };
2BD2B9741392C05A0023E1EF /* sukeybutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sukeybutton.png; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
2B3ED2961392851D0031D254 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2B3ED2BE1392A9CF0031D254 /* MapKit.framework in Frameworks */,
2B3ED2BC1392A9C60031D254 /* CoreLocation.framework in Frameworks */,
2B3ED29E1392851D0031D254 /* UIKit.framework in Frameworks */,
2B3ED2A01392851D0031D254 /* Foundation.framework in Frameworks */,
2B3ED2A21392851D0031D254 /* CoreGraphics.framework in Frameworks */,
Expand Down Expand Up @@ -64,6 +79,8 @@
2B3ED29C1392851D0031D254 /* Frameworks */ = {
isa = PBXGroup;
children = (
2B3ED2BB1392A9C60031D254 /* CoreLocation.framework */,
2B3ED2BD1392A9CF0031D254 /* MapKit.framework */,
2B3ED29D1392851D0031D254 /* UIKit.framework */,
2B3ED29F1392851D0031D254 /* Foundation.framework */,
2B3ED2A11392851D0031D254 /* CoreGraphics.framework */,
Expand All @@ -74,6 +91,7 @@
2B3ED2A31392851D0031D254 /* sukey_mapView */ = {
isa = PBXGroup;
children = (
2B3ED2B71392883E0031D254 /* View Controllers */,
2B3ED2AC1392851D0031D254 /* sukey_mapViewAppDelegate.h */,
2B3ED2AD1392851D0031D254 /* sukey_mapViewAppDelegate.m */,
2B3ED2AF1392851D0031D254 /* MainWindow.xib */,
Expand All @@ -85,6 +103,7 @@
2B3ED2A41392851D0031D254 /* Supporting Files */ = {
isa = PBXGroup;
children = (
2BD2B9701392C0330023E1EF /* Images */,
2B3ED2A51392851D0031D254 /* sukey_mapView-Info.plist */,
2B3ED2A61392851D0031D254 /* InfoPlist.strings */,
2B3ED2A91392851D0031D254 /* sukey_mapView-Prefix.pch */,
Expand All @@ -93,6 +112,25 @@
name = "Supporting Files";
sourceTree = "<group>";
};
2B3ED2B71392883E0031D254 /* View Controllers */ = {
isa = PBXGroup;
children = (
2B3ED2B81392A8AE0031D254 /* MapViewController.h */,
2B3ED2B91392A8AE0031D254 /* MapViewController.m */,
);
name = "View Controllers";
sourceTree = "<group>";
};
2BD2B9701392C0330023E1EF /* Images */ = {
isa = PBXGroup;
children = (
2BD2B9721392C05A0023E1EF /* background.png */,
2BD2B9731392C05A0023E1EF /* speechbubble.png */,
2BD2B9741392C05A0023E1EF /* sukeybutton.png */,
);
name = Images;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -145,6 +183,9 @@
files = (
2B3ED2A81392851D0031D254 /* InfoPlist.strings in Resources */,
2B3ED2B11392851D0031D254 /* MainWindow.xib in Resources */,
2BD2B9751392C05A0023E1EF /* background.png in Resources */,
2BD2B9761392C05A0023E1EF /* speechbubble.png in Resources */,
2BD2B9771392C05A0023E1EF /* sukeybutton.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -157,6 +198,7 @@
files = (
2B3ED2AB1392851D0031D254 /* main.m in Sources */,
2B3ED2AE1392851D0031D254 /* sukey_mapViewAppDelegate.m in Sources */,
2B3ED2BA1392A8AE0031D254 /* MapViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -261,6 +303,7 @@
2B3ED2B61392851D0031D254 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
21 changes: 21 additions & 0 deletions sukey_mapView/MapViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// MapViewController.h
// sukey_mapView
//
// Created by Tim Storey on 29/05/2011.
// Copyright 2011 Lateral. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>


@interface MapViewController : UIViewController {

UIView *mainView;
MKMapView *mapView;

}

@end
65 changes: 65 additions & 0 deletions sukey_mapView/MapViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//
// MapViewController.m
// sukey_mapView
//
// Created by Tim Storey on 29/05/2011.
// Copyright 2011 Lateral. All rights reserved.
//

#import "MapViewController.h"


@implementation MapViewController

- (void)dealloc
{
[super dealloc];
}

- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];

// Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView
{
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
[super viewDidLoad];
mainView = [[UIView alloc] init];
[mainView setBackgroundColor:[UIColor colorWithRed:48 green:48 blue:48 alpha:1]];
// [mainView setBackgroundColor:[UIColor blueColor]];
self.view = mainView;

mapView = [[MKMapView alloc] initWithFrame:CGRectMake(10, 30, 300, 300)];
[mapView setBackgroundColor:[UIColor grayColor]];
[mainView addSubview:mapView];
}


- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
Binary file added sukey_mapView/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sukey_mapView/speechbubble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion sukey_mapView/sukey_mapViewAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
//

#import <UIKit/UIKit.h>
#import "MapViewController.h"

@interface sukey_mapViewAppDelegate : NSObject <UIApplicationDelegate> {


MapViewController *mv;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic,retain)MapViewController *mv;

@end
4 changes: 3 additions & 1 deletion sukey_mapView/sukey_mapViewAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ @implementation sukey_mapViewAppDelegate


@synthesize window=_window;
@synthesize mv;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
mv = [[MapViewController alloc] init];
[self.window addSubview:mv.view];
[self.window makeKeyAndVisible];
return YES;
}
Expand Down
Binary file added sukey_mapView/sukeybutton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d324b98

Please sign in to comment.