From ed27520662337c48508ad0989103a45d9cdde1e9 Mon Sep 17 00:00:00 2001 From: Pierre Abi-aad Date: Sun, 25 Nov 2012 20:21:31 +0100 Subject: [PATCH 1/6] Add query system to transmit objects --- ABRouter/ABRouter.h | 6 +- ABRouter/ABRouter.m | 32 +- ABRouter/ABViewController.h | 16 + ABRouter/ABViewController.m | 44 +++ Example.xcodeproj/project.pbxproj | 18 ++ Example/Example-Prefix.pch | 2 +- Example/ExampleAppDelegate.m | 4 +- .../AlbumListViewController.h | 4 +- .../View Controllers/ObjectViewController.h | 13 + .../View Controllers/ObjectViewController.m | 43 +++ .../View Controllers/ObjectViewController.xib | 292 ++++++++++++++++++ .../PhotoListViewController.h | 3 +- .../View Controllers/PhotoViewController.h | 4 +- Example/View Controllers/RootViewController.h | 1 + Example/View Controllers/RootViewController.m | 7 + .../View Controllers/RootViewController.xib | 109 +++++-- 16 files changed, 557 insertions(+), 41 deletions(-) create mode 100644 ABRouter/ABViewController.h create mode 100644 ABRouter/ABViewController.m create mode 100644 Example/View Controllers/ObjectViewController.h create mode 100644 Example/View Controllers/ObjectViewController.m create mode 100644 Example/View Controllers/ObjectViewController.xib diff --git a/ABRouter/ABRouter.h b/ABRouter/ABRouter.h index 2711e31..3ef2258 100644 --- a/ABRouter/ABRouter.h +++ b/ABRouter/ABRouter.h @@ -20,6 +20,8 @@ #import +@class ABViewController; + @protocol Routable @property(nonatomic,retain) NSString *apiPath; @@ -36,6 +38,8 @@ - (void)match:(NSString*)pattern to:(Class)aClass; - (void)display:(id)obj withNavigationController:(UINavigationController*)navController; - (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController; +- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController andQuery:(NSDictionary*)query; - (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController; -- (UIViewController *)match:(NSString*)route; +- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController withQuery:(NSDictionary*)query; +- (ABViewController *)match:(NSString*)route; @end \ No newline at end of file diff --git a/ABRouter/ABRouter.m b/ABRouter/ABRouter.m index 4e6452e..b406da1 100644 --- a/ABRouter/ABRouter.m +++ b/ABRouter/ABRouter.m @@ -20,10 +20,11 @@ #import "ABRouter.h" #import "SOCKit.h" - +#import "ABViewController.h" #define kPatternKey @"PatternKey" #define kViewControllerKey @"ViewControllerKey" + static ABRouter *_sharedRouter = nil; @implementation ABRouter @@ -69,28 +70,44 @@ - (void)match:(NSString*)pattern to:(Class)aClass [routePatterns addObject:[NSDictionary dictionaryWithObjectsAndKeys:[SOCPattern patternWithString:pattern], kPatternKey, aClass, kViewControllerKey, nil]]; } -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController +- (void)modallyPresent:(NSString*)route from:(ABViewController*)viewController { - UIViewController * pushMe = [self match:route]; + ABViewController * pushMe = [self match:route]; pushMe.apiPath = route; UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:pushMe] autorelease]; [viewController presentModalViewController:nav animated:YES]; } +- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController withQuery:(NSDictionary*)query +{ + ABViewController * pushMe = [self match:route]; + pushMe.apiPath = route; + pushMe.query = query; + UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:pushMe] autorelease]; + [viewController presentModalViewController:nav animated:YES]; +} + - (void)display:(id)obj withNavigationController:(UINavigationController*)navController { - UIViewController * pushMe = [self match:[obj path]]; + ABViewController * pushMe = [self match:[obj path]]; pushMe.entity = obj; [navController pushViewController:pushMe animated:YES]; } - (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController { - UIViewController * pushMe = [self match:route]; + ABViewController * pushMe = [self match:route]; + [navController pushViewController:pushMe animated:YES]; +} + +- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController andQuery:(NSDictionary*)query +{ + ABViewController * pushMe = [self match:route]; + pushMe.query = query; [navController pushViewController:pushMe animated:YES]; } -- (UIViewController *)match:(NSString*)route +- (ABViewController *)match:(NSString*)route { NSArray *pathInfo = [route componentsSeparatedByString:@"?"]; route = [pathInfo objectAtIndex:0]; @@ -119,7 +136,8 @@ - (void)navigateTo:(NSString*)route withNavigationController:(UINavigationContro SOCPattern *pattern = [match objectForKey:kPatternKey]; Class class = [match objectForKey:kViewControllerKey]; - UIViewController * pushMe = [[[class alloc] init] autorelease]; + + ABViewController * pushMe = [[[class alloc] init] autorelease]; pushMe.apiPath = route; if ([pushMe respondsToSelector:@selector(setParameters:)]) diff --git a/ABRouter/ABViewController.h b/ABRouter/ABViewController.h new file mode 100644 index 0000000..d299562 --- /dev/null +++ b/ABRouter/ABViewController.h @@ -0,0 +1,16 @@ +// +// ABViewController.h +// Example +// +// Created by Pierre on 25/11/12. +// Copyright (c) 2012 Structlab LLC. All rights reserved. +// + +#import + +@interface ABViewController : UIViewController + +@property (nonatomic, retain) NSDictionary *query; +@property (nonatomic, retain) NSString *apiPath; + +@end diff --git a/ABRouter/ABViewController.m b/ABRouter/ABViewController.m new file mode 100644 index 0000000..02c4316 --- /dev/null +++ b/ABRouter/ABViewController.m @@ -0,0 +1,44 @@ +// +// ABViewController.m +// Example +// +// Created by Pierre on 25/11/12. +// Copyright (c) 2012 Structlab LLC. All rights reserved. +// + +#import "ABViewController.h" + +@interface ABViewController () + +@end + +@implementation ABViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)dealloc +{ + self.query = nil; + [super dealloc]; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index d27bc7f..41b6813 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 8FED60E216629B370011D051 /* ABViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FED60E116629B370011D051 /* ABViewController.m */; }; + 8FED60E716629DB30011D051 /* ObjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FED60E516629DB30011D051 /* ObjectViewController.m */; }; + 8FED60E816629DB30011D051 /* ObjectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8FED60E616629DB30011D051 /* ObjectViewController.xib */; }; 9305BF7E1414568D0052A06F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF7D1414568D0052A06F /* UIKit.framework */; }; 9305BF801414568D0052A06F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF7F1414568D0052A06F /* Foundation.framework */; }; 9305BF821414568D0052A06F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF811414568D0052A06F /* CoreGraphics.framework */; }; @@ -27,6 +30,11 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 8FED60E016629B370011D051 /* ABViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABViewController.h; sourceTree = ""; }; + 8FED60E116629B370011D051 /* ABViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABViewController.m; sourceTree = ""; }; + 8FED60E416629DB30011D051 /* ObjectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectViewController.h; sourceTree = ""; }; + 8FED60E516629DB30011D051 /* ObjectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjectViewController.m; sourceTree = ""; }; + 8FED60E616629DB30011D051 /* ObjectViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ObjectViewController.xib; sourceTree = ""; }; 9305BF791414568D0052A06F /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9305BF7D1414568D0052A06F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 9305BF7F1414568D0052A06F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -127,6 +135,8 @@ children = ( 9305BF9C141456A70052A06F /* ABRouter.h */, 9305BF9D141456A70052A06F /* ABRouter.m */, + 8FED60E016629B370011D051 /* ABViewController.h */, + 8FED60E116629B370011D051 /* ABViewController.m */, ); path = ABRouter; sourceTree = ""; @@ -155,6 +165,9 @@ 9305BFB4141459690052A06F /* AlbumListViewController.h */, 9305BFB5141459690052A06F /* AlbumListViewController.m */, 9305BFB6141459690052A06F /* AlbumListViewController.xib */, + 8FED60E416629DB30011D051 /* ObjectViewController.h */, + 8FED60E516629DB30011D051 /* ObjectViewController.m */, + 8FED60E616629DB30011D051 /* ObjectViewController.xib */, ); path = "View Controllers"; sourceTree = ""; @@ -215,6 +228,7 @@ 9305BFAE1414594C0052A06F /* PhotoListViewController.xib in Resources */, 9305BFB3141459580052A06F /* PhotoViewController.xib in Resources */, 9305BFB8141459690052A06F /* AlbumListViewController.xib in Resources */, + 8FED60E816629DB30011D051 /* ObjectViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -233,6 +247,8 @@ 9305BFAD1414594C0052A06F /* PhotoListViewController.m in Sources */, 9305BFB2141459580052A06F /* PhotoViewController.m in Sources */, 9305BFB7141459690052A06F /* AlbumListViewController.m in Sources */, + 8FED60E216629B370011D051 /* ABViewController.m in Sources */, + 8FED60E716629DB30011D051 /* ObjectViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -306,6 +322,7 @@ buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; + GCC_VERSION = ""; INFOPLIST_FILE = "Example/Example-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; @@ -317,6 +334,7 @@ buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; + GCC_VERSION = ""; INFOPLIST_FILE = "Example/Example-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; diff --git a/Example/Example-Prefix.pch b/Example/Example-Prefix.pch index ea84e91..e151479 100644 --- a/Example/Example-Prefix.pch +++ b/Example/Example-Prefix.pch @@ -13,4 +13,4 @@ #import #endif -#import "ABRouter.h" \ No newline at end of file +#import "ABRouter.h" diff --git a/Example/ExampleAppDelegate.m b/Example/ExampleAppDelegate.m index 7fcd7d9..06c0b96 100644 --- a/Example/ExampleAppDelegate.m +++ b/Example/ExampleAppDelegate.m @@ -12,6 +12,7 @@ #import "PhotoViewController.h" #import "AlbumListViewController.h" #import "PhotoListViewController.h" +#import "ObjectViewController.h" @implementation ExampleAppDelegate @@ -24,7 +25,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[ABRouter sharedRouter] match:@"/photos/:id" to:[PhotoViewController class]]; [[ABRouter sharedRouter] match:@"/albums" to:[AlbumListViewController class]]; [[ABRouter sharedRouter] match:@"/albums/:id" to:[PhotoListViewController class]]; - + [[ABRouter sharedRouter] match:@"/object" to:[ObjectViewController class]]; + self.rootViewController = [[[RootViewController alloc] init] autorelease]; self.navigationController = [[[UINavigationController alloc] initWithRootViewController:self.rootViewController] autorelease]; [self.window addSubview:self.navigationController.view]; diff --git a/Example/View Controllers/AlbumListViewController.h b/Example/View Controllers/AlbumListViewController.h index 51363cf..815971e 100644 --- a/Example/View Controllers/AlbumListViewController.h +++ b/Example/View Controllers/AlbumListViewController.h @@ -7,9 +7,9 @@ // #import +#import "ABViewController.h" -@interface AlbumListViewController : UIViewController -@property(nonatomic,retain) NSString *apiPath; +@interface AlbumListViewController : ABViewController @property(nonatomic,retain) IBOutlet UILabel *pathLabel; - (IBAction)showAlbum:(id)sender; @end diff --git a/Example/View Controllers/ObjectViewController.h b/Example/View Controllers/ObjectViewController.h new file mode 100644 index 0000000..6268964 --- /dev/null +++ b/Example/View Controllers/ObjectViewController.h @@ -0,0 +1,13 @@ +// +// ObjectViewController.h +// Example +// +// Created by Pierre on 25/11/12. +// Copyright (c) 2012 Structlab LLC. All rights reserved. +// + +#import "ABViewController.h" + +@interface ObjectViewController : ABViewController +@property (nonatomic,retain) IBOutlet UILabel *dateLabel; +@end diff --git a/Example/View Controllers/ObjectViewController.m b/Example/View Controllers/ObjectViewController.m new file mode 100644 index 0000000..2df6f6c --- /dev/null +++ b/Example/View Controllers/ObjectViewController.m @@ -0,0 +1,43 @@ +// +// ObjectViewController.m +// Example +// +// Created by Pierre on 25/11/12. +// Copyright (c) 2012 Structlab LLC. All rights reserved. +// + +#import "ObjectViewController.h" + +@interface ObjectViewController () + +@end + +@implementation ObjectViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + + // Custom initialization + } + return self; +} + + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + NSDate *date = [self.query objectForKey:@"date"]; + [self.dateLabel setText:[NSString stringWithFormat:@"%@",date]]; + // Do any additional setup after loading the view from its nib. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/Example/View Controllers/ObjectViewController.xib b/Example/View Controllers/ObjectViewController.xib new file mode 100644 index 0000000..040b613 --- /dev/null +++ b/Example/View Controllers/ObjectViewController.xib @@ -0,0 +1,292 @@ + + + + 1536 + 12C31a + 2843 + 1187.2 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1929 + + + IBNSLayoutConstraint + IBProxyObject + IBUILabel + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + + + 292 + {{39, 263}, {261, 21}} + + + _NS:9 + NO + YES + 7 + NO + IBCocoaTouchFramework + Label + + 1 + MCAwIDAAA + darkTextColor + + + 0 + 1 + + 1 + 17 + + + Helvetica + 17 + 16 + + NO + + + {{0, 20}, {320, 548}} + + + + 3 + MQA + + 2 + + + + + IBUIScreenMetrics + + YES + + + + + + {320, 568} + {568, 320} + + + IBCocoaTouchFramework + Retina 4 Full Screen + 2 + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + dateLabel + + + + 8 + + + + + + 0 + + + + + + 1 + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 263 + + 1000 + + 3 + 9 + 3 + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + 7 + 0 + + 0 + 1 + + 261 + + 1000 + + 3 + 9 + 1 + + + + + + 7 + + + + + 11 + + + + + 12 + + + + + + + ObjectViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 12 + + + + + ABViewController + UIViewController + + IBProjectSource + ./Classes/ABViewController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + ObjectViewController + ABViewController + + dateLabel + UILabel + + + dateLabel + + dateLabel + UILabel + + + + IBProjectSource + ./Classes/ObjectViewController.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + YES + 1929 + + diff --git a/Example/View Controllers/PhotoListViewController.h b/Example/View Controllers/PhotoListViewController.h index 42ac6ee..d214572 100644 --- a/Example/View Controllers/PhotoListViewController.h +++ b/Example/View Controllers/PhotoListViewController.h @@ -7,8 +7,9 @@ // #import +#import "ABViewController.h" -@interface PhotoListViewController : UIViewController +@interface PhotoListViewController : ABViewController @property(nonatomic,retain) IBOutlet UILabel *pathLabel; - (IBAction)showPhoto:(id)sender; @end diff --git a/Example/View Controllers/PhotoViewController.h b/Example/View Controllers/PhotoViewController.h index c0f677f..51833b5 100644 --- a/Example/View Controllers/PhotoViewController.h +++ b/Example/View Controllers/PhotoViewController.h @@ -7,8 +7,8 @@ // #import +#import "ABViewController.h" -@interface PhotoViewController : UIViewController -@property(nonatomic,retain) NSString *apiPath; +@interface PhotoViewController : ABViewController @property(nonatomic,retain) IBOutlet UILabel *pathLabel; @end diff --git a/Example/View Controllers/RootViewController.h b/Example/View Controllers/RootViewController.h index 281d5e7..5b193b7 100644 --- a/Example/View Controllers/RootViewController.h +++ b/Example/View Controllers/RootViewController.h @@ -11,5 +11,6 @@ @interface RootViewController : UIViewController - (IBAction)viewAlbums:(id)sender; - (IBAction)viewPhotos:(id)sender; +- (IBAction)viewObject:(id)sender; - (IBAction)modal:(id)sender; @end diff --git a/Example/View Controllers/RootViewController.m b/Example/View Controllers/RootViewController.m index 12541b0..802edf5 100644 --- a/Example/View Controllers/RootViewController.m +++ b/Example/View Controllers/RootViewController.m @@ -32,6 +32,13 @@ - (IBAction)viewPhotos:(id)sender [[ABRouter sharedRouter] navigateTo:@"/photos" withNavigationController:self.navigationController]; } +- (IBAction)viewObject:(id)sender +{ + NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:[NSDate date],@"date",nil]; + [[ABRouter sharedRouter] navigateTo:@"/object" withNavigationController:self.navigationController andQuery:query]; +} + + - (IBAction)modal:(id)sender { [[ABRouter sharedRouter] modallyPresent:@"/photos" from:self]; diff --git a/Example/View Controllers/RootViewController.xib b/Example/View Controllers/RootViewController.xib index 52808df..2efc626 100644 --- a/Example/View Controllers/RootViewController.xib +++ b/Example/View Controllers/RootViewController.xib @@ -1,31 +1,28 @@ - 1056 - 11B26 - 1617 - 1138 - 566.00 + 1536 + 12C31a + 2843 + 1187.2 + 625.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 534 + 1929 YES IBProxyObject - IBUIView IBUIButton + IBUIView YES com.apple.InterfaceBuilder.IBCocoaTouchPlugin - YES - - YES - - + PluginDependencyRecalculationVersion + YES @@ -54,11 +51,6 @@ IBCocoaTouchFramework 0 0 - - Helvetica-Bold - 15 - 16 - 1 View some albums @@ -73,6 +65,17 @@ 3 MC41AA + + Helvetica-Bold + Helvetica + 2 + 15 + + + Helvetica-Bold + 15 + 16 + @@ -86,7 +89,6 @@ IBCocoaTouchFramework 0 0 - 1 View some photos @@ -95,6 +97,8 @@ MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + @@ -102,13 +106,12 @@ {{74, 178}, {173, 37}} - + _NS:222 NO IBCocoaTouchFramework 0 0 - 1 How about a modal? @@ -117,6 +120,34 @@ MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + + 292 + {{24, 297}, {273, 44}} + + + + _NS:9 + NO + IBCocoaTouchFramework + 0 + 0 + 1 + Transmit some object (NSDate e.g) + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + 2 + 15 + + {{0, 20}, {320, 460}} @@ -172,13 +203,24 @@ 9 + + + viewObject: + + + 7 + + 11 + YES 0 - + + YES + @@ -190,6 +232,7 @@ + @@ -219,6 +262,11 @@ + + 10 + + + @@ -230,11 +278,12 @@ -2.CustomClassName -2.IBPluginDependency 1.IBPluginDependency + 10.IBPluginDependency 4.IBPluginDependency 5.IBPluginDependency 8.IBPluginDependency - + YES RootViewController com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -244,6 +293,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -258,7 +308,7 @@ - 9 + 11 @@ -272,13 +322,15 @@ YES modal: viewAlbums: + viewObject: viewPhotos: - + YES id id id + id @@ -287,9 +339,10 @@ YES modal: viewAlbums: + viewObject: viewPhotos: - + YES modal: @@ -299,6 +352,10 @@ viewAlbums: id + + viewObject: + id + viewPhotos: id @@ -320,6 +377,6 @@ YES 3 - 534 + 1929 From 3f8a650187507173f10a00cf68e6f39117983350 Mon Sep 17 00:00:00 2001 From: Pierre Abi-aad Date: Sun, 25 Nov 2012 20:27:08 +0100 Subject: [PATCH 2/6] memory leak fixed for apiPath --- ABRouter/ABViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ABRouter/ABViewController.m b/ABRouter/ABViewController.m index 02c4316..51654a2 100644 --- a/ABRouter/ABViewController.m +++ b/ABRouter/ABViewController.m @@ -26,6 +26,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)dealloc { self.query = nil; + self.apiPath = nil; [super dealloc]; } From 4b0896701a75d5c2ab5e308006276ef8998ee50d Mon Sep 17 00:00:00 2001 From: Pierre Abi-aad Date: Sun, 25 Nov 2012 20:41:27 +0100 Subject: [PATCH 3/6] change method's signature --- ABRouter/ABRouter.h | 4 ++-- ABRouter/ABRouter.m | 8 ++++---- ABRouter/ABViewController.h | 2 +- ABRouter/ABViewController.m | 2 +- Example/View Controllers/ObjectViewController.m | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ABRouter/ABRouter.h b/ABRouter/ABRouter.h index 3ef2258..741f003 100644 --- a/ABRouter/ABRouter.h +++ b/ABRouter/ABRouter.h @@ -38,8 +38,8 @@ - (void)match:(NSString*)pattern to:(Class)aClass; - (void)display:(id)obj withNavigationController:(UINavigationController*)navController; - (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController; -- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController andQuery:(NSDictionary*)query; +- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary*)parameters; - (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController; -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController withQuery:(NSDictionary*)query; +- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary*)parameters; - (ABViewController *)match:(NSString*)route; @end \ No newline at end of file diff --git a/ABRouter/ABRouter.m b/ABRouter/ABRouter.m index b406da1..b998fa0 100644 --- a/ABRouter/ABRouter.m +++ b/ABRouter/ABRouter.m @@ -78,11 +78,11 @@ - (void)modallyPresent:(NSString*)route from:(ABViewController*)viewController [viewController presentModalViewController:nav animated:YES]; } -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController withQuery:(NSDictionary*)query +- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary *)parameters { ABViewController * pushMe = [self match:route]; pushMe.apiPath = route; - pushMe.query = query; + pushMe.parameters = parameters; UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:pushMe] autorelease]; [viewController presentModalViewController:nav animated:YES]; } @@ -100,10 +100,10 @@ - (void)navigateTo:(NSString*)route withNavigationController:(UINavigationContro [navController pushViewController:pushMe animated:YES]; } -- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController andQuery:(NSDictionary*)query +- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary *)parameters { ABViewController * pushMe = [self match:route]; - pushMe.query = query; + pushMe.parameters = parameters; [navController pushViewController:pushMe animated:YES]; } diff --git a/ABRouter/ABViewController.h b/ABRouter/ABViewController.h index d299562..7b86102 100644 --- a/ABRouter/ABViewController.h +++ b/ABRouter/ABViewController.h @@ -10,7 +10,7 @@ @interface ABViewController : UIViewController -@property (nonatomic, retain) NSDictionary *query; +@property (nonatomic, retain) NSDictionary *parameters; @property (nonatomic, retain) NSString *apiPath; @end diff --git a/ABRouter/ABViewController.m b/ABRouter/ABViewController.m index 51654a2..163b825 100644 --- a/ABRouter/ABViewController.m +++ b/ABRouter/ABViewController.m @@ -25,7 +25,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)dealloc { - self.query = nil; + self.parameters = nil; self.apiPath = nil; [super dealloc]; } diff --git a/Example/View Controllers/ObjectViewController.m b/Example/View Controllers/ObjectViewController.m index 2df6f6c..3d8f177 100644 --- a/Example/View Controllers/ObjectViewController.m +++ b/Example/View Controllers/ObjectViewController.m @@ -29,7 +29,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - NSDate *date = [self.query objectForKey:@"date"]; + NSDate *date = [self.parameters objectForKey:@"date"]; [self.dateLabel setText:[NSString stringWithFormat:@"%@",date]]; // Do any additional setup after loading the view from its nib. } From bf5a02abfe0690164d25fb6b49808f352625dac2 Mon Sep 17 00:00:00 2001 From: Pierre Abi-aad Date: Sun, 25 Nov 2012 21:46:54 +0100 Subject: [PATCH 4/6] back to old system without inheritance --- ABRouter/ABRouter.h | 2 +- ABRouter/ABRouter.m | 32 ++++++------- ABRouter/ABViewController.h | 16 ------- ABRouter/ABViewController.m | 45 ------------------- Example.xcodeproj/project.pbxproj | 6 --- .../AlbumListViewController.h | 6 +-- .../AlbumListViewController.m | 6 +++ .../View Controllers/ObjectViewController.h | 6 ++- .../View Controllers/ObjectViewController.m | 7 +++ .../PhotoListViewController.h | 6 +-- .../PhotoListViewController.m | 6 +++ .../View Controllers/PhotoViewController.h | 6 +-- .../View Controllers/PhotoViewController.m | 6 +++ Example/View Controllers/RootViewController.m | 4 +- 14 files changed, 55 insertions(+), 99 deletions(-) delete mode 100644 ABRouter/ABViewController.h delete mode 100644 ABRouter/ABViewController.m diff --git a/ABRouter/ABRouter.h b/ABRouter/ABRouter.h index 741f003..fb95de9 100644 --- a/ABRouter/ABRouter.h +++ b/ABRouter/ABRouter.h @@ -41,5 +41,5 @@ - (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary*)parameters; - (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController; - (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary*)parameters; -- (ABViewController *)match:(NSString*)route; +- (UIViewController *)match:(NSString*)route; @end \ No newline at end of file diff --git a/ABRouter/ABRouter.m b/ABRouter/ABRouter.m index b998fa0..0a07574 100644 --- a/ABRouter/ABRouter.m +++ b/ABRouter/ABRouter.m @@ -20,7 +20,6 @@ #import "ABRouter.h" #import "SOCKit.h" -#import "ABViewController.h" #define kPatternKey @"PatternKey" #define kViewControllerKey @"ViewControllerKey" @@ -70,44 +69,41 @@ - (void)match:(NSString*)pattern to:(Class)aClass [routePatterns addObject:[NSDictionary dictionaryWithObjectsAndKeys:[SOCPattern patternWithString:pattern], kPatternKey, aClass, kViewControllerKey, nil]]; } -- (void)modallyPresent:(NSString*)route from:(ABViewController*)viewController +- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary *)parameters { - ABViewController * pushMe = [self match:route]; + UIViewController * pushMe = [self match:route]; pushMe.apiPath = route; + if ([pushMe respondsToSelector:@selector(setParameters:)] && parameters) [pushMe performSelector:@selector(setParameters:) withObject:parameters]; UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:pushMe] autorelease]; [viewController presentModalViewController:nav animated:YES]; } -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary *)parameters +- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController { - ABViewController * pushMe = [self match:route]; - pushMe.apiPath = route; - pushMe.parameters = parameters; - UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:pushMe] autorelease]; - [viewController presentModalViewController:nav animated:YES]; + [self modallyPresent:route from:viewController parameters:nil]; } - (void)display:(id)obj withNavigationController:(UINavigationController*)navController { - ABViewController * pushMe = [self match:[obj path]]; + UIViewController * pushMe = [self match:[obj path]]; pushMe.entity = obj; [navController pushViewController:pushMe animated:YES]; } -- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController +- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary *)parameters { - ABViewController * pushMe = [self match:route]; + UIViewController * pushMe = [self match:route]; + pushMe.apiPath = route; + if ([pushMe respondsToSelector:@selector(setParameters:)] && parameters) [pushMe performSelector:@selector(setParameters:) withObject:parameters]; [navController pushViewController:pushMe animated:YES]; } -- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary *)parameters +- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController { - ABViewController * pushMe = [self match:route]; - pushMe.parameters = parameters; - [navController pushViewController:pushMe animated:YES]; + [self navigateTo:route navigationController:navController parameters:nil]; } -- (ABViewController *)match:(NSString*)route +- (UIViewController *)match:(NSString*)route { NSArray *pathInfo = [route componentsSeparatedByString:@"?"]; route = [pathInfo objectAtIndex:0]; @@ -137,7 +133,7 @@ - (void)navigateTo:(NSString*)route navigationController:(UINavigationController Class class = [match objectForKey:kViewControllerKey]; - ABViewController * pushMe = [[[class alloc] init] autorelease]; + UIViewController * pushMe = [[[class alloc] init] autorelease]; pushMe.apiPath = route; if ([pushMe respondsToSelector:@selector(setParameters:)]) diff --git a/ABRouter/ABViewController.h b/ABRouter/ABViewController.h deleted file mode 100644 index 7b86102..0000000 --- a/ABRouter/ABViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ABViewController.h -// Example -// -// Created by Pierre on 25/11/12. -// Copyright (c) 2012 Structlab LLC. All rights reserved. -// - -#import - -@interface ABViewController : UIViewController - -@property (nonatomic, retain) NSDictionary *parameters; -@property (nonatomic, retain) NSString *apiPath; - -@end diff --git a/ABRouter/ABViewController.m b/ABRouter/ABViewController.m deleted file mode 100644 index 163b825..0000000 --- a/ABRouter/ABViewController.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// ABViewController.m -// Example -// -// Created by Pierre on 25/11/12. -// Copyright (c) 2012 Structlab LLC. All rights reserved. -// - -#import "ABViewController.h" - -@interface ABViewController () - -@end - -@implementation ABViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)dealloc -{ - self.parameters = nil; - self.apiPath = nil; - [super dealloc]; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index 41b6813..96aec72 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 8FED60E216629B370011D051 /* ABViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FED60E116629B370011D051 /* ABViewController.m */; }; 8FED60E716629DB30011D051 /* ObjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FED60E516629DB30011D051 /* ObjectViewController.m */; }; 8FED60E816629DB30011D051 /* ObjectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8FED60E616629DB30011D051 /* ObjectViewController.xib */; }; 9305BF7E1414568D0052A06F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF7D1414568D0052A06F /* UIKit.framework */; }; @@ -30,8 +29,6 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 8FED60E016629B370011D051 /* ABViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABViewController.h; sourceTree = ""; }; - 8FED60E116629B370011D051 /* ABViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABViewController.m; sourceTree = ""; }; 8FED60E416629DB30011D051 /* ObjectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectViewController.h; sourceTree = ""; }; 8FED60E516629DB30011D051 /* ObjectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjectViewController.m; sourceTree = ""; }; 8FED60E616629DB30011D051 /* ObjectViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ObjectViewController.xib; sourceTree = ""; }; @@ -135,8 +132,6 @@ children = ( 9305BF9C141456A70052A06F /* ABRouter.h */, 9305BF9D141456A70052A06F /* ABRouter.m */, - 8FED60E016629B370011D051 /* ABViewController.h */, - 8FED60E116629B370011D051 /* ABViewController.m */, ); path = ABRouter; sourceTree = ""; @@ -247,7 +242,6 @@ 9305BFAD1414594C0052A06F /* PhotoListViewController.m in Sources */, 9305BFB2141459580052A06F /* PhotoViewController.m in Sources */, 9305BFB7141459690052A06F /* AlbumListViewController.m in Sources */, - 8FED60E216629B370011D051 /* ABViewController.m in Sources */, 8FED60E716629DB30011D051 /* ObjectViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Example/View Controllers/AlbumListViewController.h b/Example/View Controllers/AlbumListViewController.h index 815971e..ed1b957 100644 --- a/Example/View Controllers/AlbumListViewController.h +++ b/Example/View Controllers/AlbumListViewController.h @@ -7,9 +7,9 @@ // #import -#import "ABViewController.h" -@interface AlbumListViewController : ABViewController -@property(nonatomic,retain) IBOutlet UILabel *pathLabel; +@interface AlbumListViewController : UIViewController +@property (nonatomic, retain) NSString *apiPath; +@property (nonatomic,retain) IBOutlet UILabel *pathLabel; - (IBAction)showAlbum:(id)sender; @end diff --git a/Example/View Controllers/AlbumListViewController.m b/Example/View Controllers/AlbumListViewController.m index c646227..9799a4b 100644 --- a/Example/View Controllers/AlbumListViewController.m +++ b/Example/View Controllers/AlbumListViewController.m @@ -22,6 +22,12 @@ - (id)init return self; } +- (void)dealloc +{ + self.apiPath = nil; + [super dealloc]; +} + #pragma mark - View lifecycle - (void)viewDidLoad diff --git a/Example/View Controllers/ObjectViewController.h b/Example/View Controllers/ObjectViewController.h index 6268964..cc66910 100644 --- a/Example/View Controllers/ObjectViewController.h +++ b/Example/View Controllers/ObjectViewController.h @@ -6,8 +6,10 @@ // Copyright (c) 2012 Structlab LLC. All rights reserved. // -#import "ABViewController.h" +#import -@interface ObjectViewController : ABViewController +@interface ObjectViewController : UIViewController +@property (nonatomic, retain) NSString *apiPath; +@property (nonatomic, retain) NSDictionary *parameters; @property (nonatomic,retain) IBOutlet UILabel *dateLabel; @end diff --git a/Example/View Controllers/ObjectViewController.m b/Example/View Controllers/ObjectViewController.m index 3d8f177..ed38869 100644 --- a/Example/View Controllers/ObjectViewController.m +++ b/Example/View Controllers/ObjectViewController.m @@ -24,6 +24,13 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil return self; } +- (void)dealloc +{ + self.parameters = nil; + self.apiPath = nil; + + [super dealloc]; +} - (void)viewDidLoad { diff --git a/Example/View Controllers/PhotoListViewController.h b/Example/View Controllers/PhotoListViewController.h index d214572..9536dc3 100644 --- a/Example/View Controllers/PhotoListViewController.h +++ b/Example/View Controllers/PhotoListViewController.h @@ -7,9 +7,9 @@ // #import -#import "ABViewController.h" -@interface PhotoListViewController : ABViewController -@property(nonatomic,retain) IBOutlet UILabel *pathLabel; +@interface PhotoListViewController : UIViewController +@property (nonatomic, retain) NSString *apiPath; +@property (nonatomic,retain) IBOutlet UILabel *pathLabel; - (IBAction)showPhoto:(id)sender; @end diff --git a/Example/View Controllers/PhotoListViewController.m b/Example/View Controllers/PhotoListViewController.m index f3ec84d..bca771c 100644 --- a/Example/View Controllers/PhotoListViewController.m +++ b/Example/View Controllers/PhotoListViewController.m @@ -22,6 +22,12 @@ - (id)init return self; } +- (void)dealloc +{ + self.apiPath = nil; + [super dealloc]; +} + #pragma mark - View lifecycle - (void)viewDidLoad diff --git a/Example/View Controllers/PhotoViewController.h b/Example/View Controllers/PhotoViewController.h index 51833b5..eca613e 100644 --- a/Example/View Controllers/PhotoViewController.h +++ b/Example/View Controllers/PhotoViewController.h @@ -7,8 +7,8 @@ // #import -#import "ABViewController.h" -@interface PhotoViewController : ABViewController -@property(nonatomic,retain) IBOutlet UILabel *pathLabel; +@interface PhotoViewController : UIViewController +@property (nonatomic, retain) NSString *apiPath; +@property (nonatomic,retain) IBOutlet UILabel *pathLabel; @end diff --git a/Example/View Controllers/PhotoViewController.m b/Example/View Controllers/PhotoViewController.m index 0fe18dd..2df602c 100644 --- a/Example/View Controllers/PhotoViewController.m +++ b/Example/View Controllers/PhotoViewController.m @@ -22,6 +22,12 @@ - (id)init return self; } +- (void)dealloc +{ + self.apiPath = nil; + [super dealloc]; +} + #pragma mark - View lifecycle - (void)viewDidLoad diff --git a/Example/View Controllers/RootViewController.m b/Example/View Controllers/RootViewController.m index 802edf5..7765be2 100644 --- a/Example/View Controllers/RootViewController.m +++ b/Example/View Controllers/RootViewController.m @@ -29,13 +29,13 @@ - (IBAction)viewAlbums:(id)sender - (IBAction)viewPhotos:(id)sender { - [[ABRouter sharedRouter] navigateTo:@"/photos" withNavigationController:self.navigationController]; + [[ABRouter sharedRouter] navigateTo:@"/photos" navigationController:self.navigationController parameters:nil]; } - (IBAction)viewObject:(id)sender { NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:[NSDate date],@"date",nil]; - [[ABRouter sharedRouter] navigateTo:@"/object" withNavigationController:self.navigationController andQuery:query]; + [[ABRouter sharedRouter] navigateTo:@"/object" navigationController:self.navigationController parameters:query]; } From 790d799f385c48066e5fe1a3c5db8f9e006c3619 Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 6 Jun 2013 14:28:30 +0200 Subject: [PATCH 5/6] Re-struct project for my usage --- ABRouter/ABRouter.h | 45 -- ABRouter/ABRouter.m | 167 ------ Example.xcodeproj/project.pbxproj | 362 ------------ Example/Example-Info.plist | 38 -- Example/Example-Prefix.pch | 16 - Example/ExampleAppDelegate.h | 17 - Example/ExampleAppDelegate.m | 66 --- .../AlbumListViewController.h | 15 - .../AlbumListViewController.m | 49 -- .../AlbumListViewController.xib | 351 ------------ .../View Controllers/ObjectViewController.h | 15 - .../View Controllers/ObjectViewController.m | 50 -- .../View Controllers/ObjectViewController.xib | 292 ---------- .../PhotoListViewController.h | 15 - .../PhotoListViewController.m | 45 -- .../PhotoListViewController.xib | 310 ---------- .../View Controllers/PhotoViewController.h | 14 - .../View Controllers/PhotoViewController.m | 39 -- .../View Controllers/PhotoViewController.xib | 207 ------- Example/View Controllers/RootViewController.h | 16 - Example/View Controllers/RootViewController.m | 47 -- .../View Controllers/RootViewController.xib | 382 ------------ Example/en.lproj/InfoPlist.strings | 2 - Example/en.lproj/MainWindow.xib | 198 ------- Example/main.m | 17 - .../GowallaExample.xcodeproj/project.pbxproj | 452 --------------- .../GowallaExample/AFGowallaAPIClient.h | 31 - .../GowallaExample/AFGowallaAPIClient.m | 66 --- .../GowallaExample/GowallaExample-Info.plist | 38 -- .../GowallaExample/GowallaExample-Prefix.pch | 17 - .../GowallaExampleAppDelegate.h | 18 - .../GowallaExampleAppDelegate.m | 79 --- .../CheckinsTableViewController.h | 14 - .../CheckinsTableViewController.m | 93 --- .../View Controllers/SpotViewController.h | 23 - .../View Controllers/SpotViewController.m | 93 --- .../View Controllers/SpotViewController.xib | 495 ---------------- .../SpotsTableViewController.h | 13 - .../SpotsTableViewController.m | 92 --- .../GowallaExample/en.lproj/InfoPlist.strings | 2 - .../GowallaExample/en.lproj/MainWindow.xib | 198 ------- .../GowallaExample/images/empty_50.png | Bin 980 -> 0 bytes GowallaExample/GowallaExample/main.m | 17 - GowallaExample/Libraries/AFNetworking | 1 - GowallaExample/Libraries/JSONKit | 1 - LICENSE | 19 - .../MappingExample.xcodeproj/project.pbxproj | 338 ----------- .../MappingExample/MapViewController.h | 16 - .../MappingExample/MapViewController.m | 59 -- .../MappingExample/MapViewController.xib | 197 ------- .../MappingExample/MappingExample-Info.plist | 38 -- .../MappingExample/MappingExample-Prefix.pch | 16 - .../MappingExampleAppDelegate.h | 17 - .../MappingExampleAppDelegate.m | 71 --- .../MappingExample/RootViewController.h | 15 - .../MappingExample/RootViewController.m | 49 -- .../MappingExample/en.lproj/InfoPlist.strings | 2 - .../MappingExample/en.lproj/MainWindow.xib | 542 ------------------ .../en.lproj/RootViewController.xib | 384 ------------- MappingExample/MappingExample/main.m | 17 - README.markdown | 82 --- 61 files changed, 6380 deletions(-) delete mode 100644 ABRouter/ABRouter.h delete mode 100644 ABRouter/ABRouter.m delete mode 100644 Example.xcodeproj/project.pbxproj delete mode 100644 Example/Example-Info.plist delete mode 100644 Example/Example-Prefix.pch delete mode 100644 Example/ExampleAppDelegate.h delete mode 100644 Example/ExampleAppDelegate.m delete mode 100644 Example/View Controllers/AlbumListViewController.h delete mode 100644 Example/View Controllers/AlbumListViewController.m delete mode 100644 Example/View Controllers/AlbumListViewController.xib delete mode 100644 Example/View Controllers/ObjectViewController.h delete mode 100644 Example/View Controllers/ObjectViewController.m delete mode 100644 Example/View Controllers/ObjectViewController.xib delete mode 100644 Example/View Controllers/PhotoListViewController.h delete mode 100644 Example/View Controllers/PhotoListViewController.m delete mode 100644 Example/View Controllers/PhotoListViewController.xib delete mode 100644 Example/View Controllers/PhotoViewController.h delete mode 100644 Example/View Controllers/PhotoViewController.m delete mode 100644 Example/View Controllers/PhotoViewController.xib delete mode 100644 Example/View Controllers/RootViewController.h delete mode 100644 Example/View Controllers/RootViewController.m delete mode 100644 Example/View Controllers/RootViewController.xib delete mode 100644 Example/en.lproj/InfoPlist.strings delete mode 100644 Example/en.lproj/MainWindow.xib delete mode 100644 Example/main.m delete mode 100644 GowallaExample/GowallaExample.xcodeproj/project.pbxproj delete mode 100644 GowallaExample/GowallaExample/AFGowallaAPIClient.h delete mode 100644 GowallaExample/GowallaExample/AFGowallaAPIClient.m delete mode 100644 GowallaExample/GowallaExample/GowallaExample-Info.plist delete mode 100644 GowallaExample/GowallaExample/GowallaExample-Prefix.pch delete mode 100644 GowallaExample/GowallaExample/GowallaExampleAppDelegate.h delete mode 100644 GowallaExample/GowallaExample/GowallaExampleAppDelegate.m delete mode 100644 GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.h delete mode 100644 GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.m delete mode 100644 GowallaExample/GowallaExample/View Controllers/SpotViewController.h delete mode 100644 GowallaExample/GowallaExample/View Controllers/SpotViewController.m delete mode 100644 GowallaExample/GowallaExample/View Controllers/SpotViewController.xib delete mode 100644 GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.h delete mode 100644 GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.m delete mode 100644 GowallaExample/GowallaExample/en.lproj/InfoPlist.strings delete mode 100644 GowallaExample/GowallaExample/en.lproj/MainWindow.xib delete mode 100644 GowallaExample/GowallaExample/images/empty_50.png delete mode 100644 GowallaExample/GowallaExample/main.m delete mode 160000 GowallaExample/Libraries/AFNetworking delete mode 160000 GowallaExample/Libraries/JSONKit delete mode 100644 LICENSE delete mode 100644 MappingExample/MappingExample.xcodeproj/project.pbxproj delete mode 100644 MappingExample/MappingExample/MapViewController.h delete mode 100644 MappingExample/MappingExample/MapViewController.m delete mode 100644 MappingExample/MappingExample/MapViewController.xib delete mode 100644 MappingExample/MappingExample/MappingExample-Info.plist delete mode 100644 MappingExample/MappingExample/MappingExample-Prefix.pch delete mode 100644 MappingExample/MappingExample/MappingExampleAppDelegate.h delete mode 100644 MappingExample/MappingExample/MappingExampleAppDelegate.m delete mode 100644 MappingExample/MappingExample/RootViewController.h delete mode 100644 MappingExample/MappingExample/RootViewController.m delete mode 100644 MappingExample/MappingExample/en.lproj/InfoPlist.strings delete mode 100644 MappingExample/MappingExample/en.lproj/MainWindow.xib delete mode 100644 MappingExample/MappingExample/en.lproj/RootViewController.xib delete mode 100644 MappingExample/MappingExample/main.m delete mode 100644 README.markdown diff --git a/ABRouter/ABRouter.h b/ABRouter/ABRouter.h deleted file mode 100644 index fb95de9..0000000 --- a/ABRouter/ABRouter.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2011 Aaron Brethorst - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -#import - -@class ABViewController; - -@protocol Routable -@property(nonatomic,retain) NSString *apiPath; - -@optional -@property(nonatomic,retain) NSDictionary *parameters; -@property(nonatomic,retain) id entity; -@end - -@interface ABRouter : NSObject -{ - NSMutableArray *routePatterns; -} -+ (ABRouter*)sharedRouter; -- (void)match:(NSString*)pattern to:(Class)aClass; -- (void)display:(id)obj withNavigationController:(UINavigationController*)navController; -- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController; -- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary*)parameters; -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController; -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary*)parameters; -- (UIViewController *)match:(NSString*)route; -@end \ No newline at end of file diff --git a/ABRouter/ABRouter.m b/ABRouter/ABRouter.m deleted file mode 100644 index 0a07574..0000000 --- a/ABRouter/ABRouter.m +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) 2011 Aaron Brethorst - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -#import "ABRouter.h" -#import "SOCKit.h" -#define kPatternKey @"PatternKey" -#define kViewControllerKey @"ViewControllerKey" - - -static ABRouter *_sharedRouter = nil; - -@implementation ABRouter - -+ (ABRouter*)sharedRouter -{ - @synchronized(self) - { - if (!_sharedRouter) - { - _sharedRouter = [[ABRouter alloc] init]; - } - } - - return _sharedRouter; -} - -- (id)init -{ - self = [super init]; - if (self) - { - routePatterns = [[NSMutableArray alloc] init]; - } - return self; -} - -- (void)dealloc -{ - [routePatterns release]; - [super dealloc]; -} - -#pragma mark - Public Methods - -- (void)match:(NSString*)pattern to:(Class)aClass -{ - if (![aClass conformsToProtocol:@protocol(Routable)]) - { - [NSException raise:@"View Controller must conform to Routable protocol." format:@"%@", NSStringFromClass(aClass), nil]; - } - - [routePatterns addObject:[NSDictionary dictionaryWithObjectsAndKeys:[SOCPattern patternWithString:pattern], kPatternKey, aClass, kViewControllerKey, nil]]; -} - -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController parameters:(NSDictionary *)parameters -{ - UIViewController * pushMe = [self match:route]; - pushMe.apiPath = route; - if ([pushMe respondsToSelector:@selector(setParameters:)] && parameters) [pushMe performSelector:@selector(setParameters:) withObject:parameters]; - UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:pushMe] autorelease]; - [viewController presentModalViewController:nav animated:YES]; -} - -- (void)modallyPresent:(NSString*)route from:(UIViewController*)viewController -{ - [self modallyPresent:route from:viewController parameters:nil]; -} - -- (void)display:(id)obj withNavigationController:(UINavigationController*)navController -{ - UIViewController * pushMe = [self match:[obj path]]; - pushMe.entity = obj; - [navController pushViewController:pushMe animated:YES]; -} - -- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary *)parameters -{ - UIViewController * pushMe = [self match:route]; - pushMe.apiPath = route; - if ([pushMe respondsToSelector:@selector(setParameters:)] && parameters) [pushMe performSelector:@selector(setParameters:) withObject:parameters]; - [navController pushViewController:pushMe animated:YES]; -} - -- (void)navigateTo:(NSString*)route withNavigationController:(UINavigationController*)navController -{ - [self navigateTo:route navigationController:navController parameters:nil]; -} - -- (UIViewController *)match:(NSString*)route -{ - NSArray *pathInfo = [route componentsSeparatedByString:@"?"]; - route = [pathInfo objectAtIndex:0]; - - NSMutableArray *potentialMatches = [NSMutableArray array]; - for (NSDictionary *d in routePatterns) - { - if ([[d objectForKey:kPatternKey] stringMatches:route]) - { - [potentialMatches addObject:d]; - } - } - - if (0 == [potentialMatches count]) - { - // TODO: figure out a better punting strategy. - // Facebook opens up a UIWebView, which is sort - // of lame but seems like the least terrible of - // all solutions. - - return nil; - } - - NSDictionary *match = [potentialMatches lastObject]; - - SOCPattern *pattern = [match objectForKey:kPatternKey]; - Class class = [match objectForKey:kViewControllerKey]; - - - UIViewController * pushMe = [[[class alloc] init] autorelease]; - pushMe.apiPath = route; - - if ([pushMe respondsToSelector:@selector(setParameters:)]) - { - NSMutableDictionary *params = [NSMutableDictionary dictionary]; - - if (pathInfo.count > 1) - { - NSString *paramsString = [pathInfo objectAtIndex:1]; - NSArray *paramStringArr = [paramsString componentsSeparatedByString:@"&"]; - for (NSString *paramString in paramStringArr) - { - NSArray *paramArr = [paramString componentsSeparatedByString:@"="]; - if (paramArr.count > 1) - { - NSString *key = [paramArr objectAtIndex:0]; - NSString *value = [paramArr objectAtIndex:1]; - [params setObject:value forKey:key]; - } - } - } - - [params addEntriesFromDictionary:[pattern parameterDictionaryFromSourceString:route]]; - - [pushMe performSelector:@selector(setParameters:) withObject:params]; - } - - return pushMe; -} - -@end diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj deleted file mode 100644 index 96aec72..0000000 --- a/Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,362 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 8FED60E716629DB30011D051 /* ObjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FED60E516629DB30011D051 /* ObjectViewController.m */; }; - 8FED60E816629DB30011D051 /* ObjectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8FED60E616629DB30011D051 /* ObjectViewController.xib */; }; - 9305BF7E1414568D0052A06F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF7D1414568D0052A06F /* UIKit.framework */; }; - 9305BF801414568D0052A06F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF7F1414568D0052A06F /* Foundation.framework */; }; - 9305BF821414568D0052A06F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BF811414568D0052A06F /* CoreGraphics.framework */; }; - 9305BF881414568D0052A06F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9305BF861414568D0052A06F /* InfoPlist.strings */; }; - 9305BF8A1414568D0052A06F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BF891414568D0052A06F /* main.m */; }; - 9305BF8E1414568D0052A06F /* ExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BF8D1414568D0052A06F /* ExampleAppDelegate.m */; }; - 9305BF911414568D0052A06F /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9305BF8F1414568D0052A06F /* MainWindow.xib */; }; - 9305BF9E141456A70052A06F /* ABRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BF9D141456A70052A06F /* ABRouter.m */; }; - 9305BFA3141456DF0052A06F /* SOCKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFA2141456DF0052A06F /* SOCKit.m */; }; - 9305BFA8141459370052A06F /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFA6141459370052A06F /* RootViewController.m */; }; - 9305BFA9141459370052A06F /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9305BFA7141459370052A06F /* RootViewController.xib */; }; - 9305BFAD1414594C0052A06F /* PhotoListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFAB1414594C0052A06F /* PhotoListViewController.m */; }; - 9305BFAE1414594C0052A06F /* PhotoListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9305BFAC1414594C0052A06F /* PhotoListViewController.xib */; }; - 9305BFB2141459580052A06F /* PhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFB0141459580052A06F /* PhotoViewController.m */; }; - 9305BFB3141459580052A06F /* PhotoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9305BFB1141459580052A06F /* PhotoViewController.xib */; }; - 9305BFB7141459690052A06F /* AlbumListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFB5141459690052A06F /* AlbumListViewController.m */; }; - 9305BFB8141459690052A06F /* AlbumListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9305BFB6141459690052A06F /* AlbumListViewController.xib */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 8FED60E416629DB30011D051 /* ObjectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectViewController.h; sourceTree = ""; }; - 8FED60E516629DB30011D051 /* ObjectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjectViewController.m; sourceTree = ""; }; - 8FED60E616629DB30011D051 /* ObjectViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ObjectViewController.xib; sourceTree = ""; }; - 9305BF791414568D0052A06F /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9305BF7D1414568D0052A06F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 9305BF7F1414568D0052A06F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 9305BF811414568D0052A06F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 9305BF851414568D0052A06F /* Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Example-Info.plist"; sourceTree = ""; }; - 9305BF871414568D0052A06F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9305BF891414568D0052A06F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9305BF8B1414568D0052A06F /* Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-Prefix.pch"; sourceTree = ""; }; - 9305BF8C1414568D0052A06F /* ExampleAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExampleAppDelegate.h; sourceTree = ""; }; - 9305BF8D1414568D0052A06F /* ExampleAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleAppDelegate.m; sourceTree = ""; }; - 9305BF901414568D0052A06F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - 9305BF9C141456A70052A06F /* ABRouter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABRouter.h; sourceTree = ""; }; - 9305BF9D141456A70052A06F /* ABRouter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABRouter.m; sourceTree = ""; }; - 9305BFA1141456DF0052A06F /* SOCKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SOCKit.h; path = SOCKit/SOCKit.h; sourceTree = ""; }; - 9305BFA2141456DF0052A06F /* SOCKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SOCKit.m; path = SOCKit/SOCKit.m; sourceTree = ""; }; - 9305BFA5141459370052A06F /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 9305BFA6141459370052A06F /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; - 9305BFA7141459370052A06F /* RootViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = ""; }; - 9305BFAA1414594C0052A06F /* PhotoListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotoListViewController.h; sourceTree = ""; }; - 9305BFAB1414594C0052A06F /* PhotoListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotoListViewController.m; sourceTree = ""; }; - 9305BFAC1414594C0052A06F /* PhotoListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PhotoListViewController.xib; sourceTree = ""; }; - 9305BFAF141459580052A06F /* PhotoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotoViewController.h; sourceTree = ""; }; - 9305BFB0141459580052A06F /* PhotoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotoViewController.m; sourceTree = ""; }; - 9305BFB1141459580052A06F /* PhotoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PhotoViewController.xib; sourceTree = ""; }; - 9305BFB4141459690052A06F /* AlbumListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlbumListViewController.h; sourceTree = ""; }; - 9305BFB5141459690052A06F /* AlbumListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlbumListViewController.m; sourceTree = ""; }; - 9305BFB6141459690052A06F /* AlbumListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AlbumListViewController.xib; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9305BF761414568D0052A06F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9305BF7E1414568D0052A06F /* UIKit.framework in Frameworks */, - 9305BF801414568D0052A06F /* Foundation.framework in Frameworks */, - 9305BF821414568D0052A06F /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9305BF6E1414568D0052A06F = { - isa = PBXGroup; - children = ( - 9305BFA0141456D60052A06F /* SOCKit */, - 9305BF9B141456A70052A06F /* ABRouter */, - 9305BF831414568D0052A06F /* Example */, - 9305BF7C1414568D0052A06F /* Frameworks */, - 9305BF7A1414568D0052A06F /* Products */, - ); - sourceTree = ""; - }; - 9305BF7A1414568D0052A06F /* Products */ = { - isa = PBXGroup; - children = ( - 9305BF791414568D0052A06F /* Example.app */, - ); - name = Products; - sourceTree = ""; - }; - 9305BF7C1414568D0052A06F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9305BF7D1414568D0052A06F /* UIKit.framework */, - 9305BF7F1414568D0052A06F /* Foundation.framework */, - 9305BF811414568D0052A06F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9305BF831414568D0052A06F /* Example */ = { - isa = PBXGroup; - children = ( - 9305BFA4141459200052A06F /* View Controllers */, - 9305BF8C1414568D0052A06F /* ExampleAppDelegate.h */, - 9305BF8D1414568D0052A06F /* ExampleAppDelegate.m */, - 9305BF8F1414568D0052A06F /* MainWindow.xib */, - 9305BF841414568D0052A06F /* Supporting Files */, - ); - path = Example; - sourceTree = ""; - }; - 9305BF841414568D0052A06F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9305BF851414568D0052A06F /* Example-Info.plist */, - 9305BF861414568D0052A06F /* InfoPlist.strings */, - 9305BF891414568D0052A06F /* main.m */, - 9305BF8B1414568D0052A06F /* Example-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9305BF9B141456A70052A06F /* ABRouter */ = { - isa = PBXGroup; - children = ( - 9305BF9C141456A70052A06F /* ABRouter.h */, - 9305BF9D141456A70052A06F /* ABRouter.m */, - ); - path = ABRouter; - sourceTree = ""; - }; - 9305BFA0141456D60052A06F /* SOCKit */ = { - isa = PBXGroup; - children = ( - 9305BFA1141456DF0052A06F /* SOCKit.h */, - 9305BFA2141456DF0052A06F /* SOCKit.m */, - ); - name = SOCKit; - sourceTree = ""; - }; - 9305BFA4141459200052A06F /* View Controllers */ = { - isa = PBXGroup; - children = ( - 9305BFA5141459370052A06F /* RootViewController.h */, - 9305BFA6141459370052A06F /* RootViewController.m */, - 9305BFA7141459370052A06F /* RootViewController.xib */, - 9305BFAA1414594C0052A06F /* PhotoListViewController.h */, - 9305BFAB1414594C0052A06F /* PhotoListViewController.m */, - 9305BFAC1414594C0052A06F /* PhotoListViewController.xib */, - 9305BFAF141459580052A06F /* PhotoViewController.h */, - 9305BFB0141459580052A06F /* PhotoViewController.m */, - 9305BFB1141459580052A06F /* PhotoViewController.xib */, - 9305BFB4141459690052A06F /* AlbumListViewController.h */, - 9305BFB5141459690052A06F /* AlbumListViewController.m */, - 9305BFB6141459690052A06F /* AlbumListViewController.xib */, - 8FED60E416629DB30011D051 /* ObjectViewController.h */, - 8FED60E516629DB30011D051 /* ObjectViewController.m */, - 8FED60E616629DB30011D051 /* ObjectViewController.xib */, - ); - path = "View Controllers"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9305BF781414568D0052A06F /* Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9305BF941414568D0052A06F /* Build configuration list for PBXNativeTarget "Example" */; - buildPhases = ( - 9305BF751414568D0052A06F /* Sources */, - 9305BF761414568D0052A06F /* Frameworks */, - 9305BF771414568D0052A06F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Example; - productName = Example; - productReference = 9305BF791414568D0052A06F /* Example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9305BF701414568D0052A06F /* Project object */ = { - isa = PBXProject; - attributes = { - ORGANIZATIONNAME = "Structlab LLC"; - }; - buildConfigurationList = 9305BF731414568D0052A06F /* Build configuration list for PBXProject "Example" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9305BF6E1414568D0052A06F; - productRefGroup = 9305BF7A1414568D0052A06F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9305BF781414568D0052A06F /* Example */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9305BF771414568D0052A06F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9305BF881414568D0052A06F /* InfoPlist.strings in Resources */, - 9305BF911414568D0052A06F /* MainWindow.xib in Resources */, - 9305BFA9141459370052A06F /* RootViewController.xib in Resources */, - 9305BFAE1414594C0052A06F /* PhotoListViewController.xib in Resources */, - 9305BFB3141459580052A06F /* PhotoViewController.xib in Resources */, - 9305BFB8141459690052A06F /* AlbumListViewController.xib in Resources */, - 8FED60E816629DB30011D051 /* ObjectViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9305BF751414568D0052A06F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9305BF8A1414568D0052A06F /* main.m in Sources */, - 9305BF8E1414568D0052A06F /* ExampleAppDelegate.m in Sources */, - 9305BF9E141456A70052A06F /* ABRouter.m in Sources */, - 9305BFA3141456DF0052A06F /* SOCKit.m in Sources */, - 9305BFA8141459370052A06F /* RootViewController.m in Sources */, - 9305BFAD1414594C0052A06F /* PhotoListViewController.m in Sources */, - 9305BFB2141459580052A06F /* PhotoViewController.m in Sources */, - 9305BFB7141459690052A06F /* AlbumListViewController.m in Sources */, - 8FED60E716629DB30011D051 /* ObjectViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 9305BF861414568D0052A06F /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9305BF871414568D0052A06F /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 9305BF8F1414568D0052A06F /* MainWindow.xib */ = { - isa = PBXVariantGroup; - children = ( - 9305BF901414568D0052A06F /* en */, - ); - name = MainWindow.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9305BF921414568D0052A06F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 9305BF931414568D0052A06F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 9305BF951414568D0052A06F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; - GCC_VERSION = ""; - INFOPLIST_FILE = "Example/Example-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 9305BF961414568D0052A06F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; - GCC_VERSION = ""; - INFOPLIST_FILE = "Example/Example-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9305BF731414568D0052A06F /* Build configuration list for PBXProject "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9305BF921414568D0052A06F /* Debug */, - 9305BF931414568D0052A06F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9305BF941414568D0052A06F /* Build configuration list for PBXNativeTarget "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9305BF951414568D0052A06F /* Debug */, - 9305BF961414568D0052A06F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9305BF701414568D0052A06F /* Project object */; -} diff --git a/Example/Example-Info.plist b/Example/Example-Info.plist deleted file mode 100644 index 2f07f4b..0000000 --- a/Example/Example-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.structlab.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/Example-Prefix.pch b/Example/Example-Prefix.pch deleted file mode 100644 index e151479..0000000 --- a/Example/Example-Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header for all source files of the 'Example' target in the 'Example' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif - -#import "ABRouter.h" diff --git a/Example/ExampleAppDelegate.h b/Example/ExampleAppDelegate.h deleted file mode 100644 index 0e2267f..0000000 --- a/Example/ExampleAppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// ExampleAppDelegate.h -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@class RootViewController; - -@interface ExampleAppDelegate : NSObject -@property(nonatomic,retain) IBOutlet UIWindow *window; -@property(nonatomic,retain) RootViewController *rootViewController; -@property(nonatomic,retain) UINavigationController *navigationController; -@end diff --git a/Example/ExampleAppDelegate.m b/Example/ExampleAppDelegate.m deleted file mode 100644 index 06c0b96..0000000 --- a/Example/ExampleAppDelegate.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// ExampleAppDelegate.m -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "ExampleAppDelegate.h" -#import "RootViewController.h" -#import "PhotoListViewController.h" -#import "PhotoViewController.h" -#import "AlbumListViewController.h" -#import "PhotoListViewController.h" -#import "ObjectViewController.h" - -@implementation ExampleAppDelegate - -@synthesize window = _window; -@synthesize rootViewController, navigationController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - [[ABRouter sharedRouter] match:@"/photos" to:[PhotoListViewController class]]; - [[ABRouter sharedRouter] match:@"/photos/:id" to:[PhotoViewController class]]; - [[ABRouter sharedRouter] match:@"/albums" to:[AlbumListViewController class]]; - [[ABRouter sharedRouter] match:@"/albums/:id" to:[PhotoListViewController class]]; - [[ABRouter sharedRouter] match:@"/object" to:[ObjectViewController class]]; - - self.rootViewController = [[[RootViewController alloc] init] autorelease]; - self.navigationController = [[[UINavigationController alloc] initWithRootViewController:self.rootViewController] autorelease]; - [self.window addSubview:self.navigationController.view]; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ -} - -- (void)dealloc -{ - self.rootViewController = nil; - self.navigationController = nil; - - [_window release]; - [super dealloc]; -} - -@end diff --git a/Example/View Controllers/AlbumListViewController.h b/Example/View Controllers/AlbumListViewController.h deleted file mode 100644 index ed1b957..0000000 --- a/Example/View Controllers/AlbumListViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AlbumListViewController.h -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface AlbumListViewController : UIViewController -@property (nonatomic, retain) NSString *apiPath; -@property (nonatomic,retain) IBOutlet UILabel *pathLabel; -- (IBAction)showAlbum:(id)sender; -@end diff --git a/Example/View Controllers/AlbumListViewController.m b/Example/View Controllers/AlbumListViewController.m deleted file mode 100644 index 9799a4b..0000000 --- a/Example/View Controllers/AlbumListViewController.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// AlbumListViewController.m -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "AlbumListViewController.h" - -@implementation AlbumListViewController -@synthesize apiPath; -@synthesize pathLabel; - -- (id)init -{ - self = [super initWithNibName:@"AlbumListViewController" bundle:nil]; - if (self) - { - self.title = NSStringFromClass([self class]); - } - return self; -} - -- (void)dealloc -{ - self.apiPath = nil; - [super dealloc]; -} - -#pragma mark - View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.pathLabel.text = [NSString stringWithFormat:@"Welcome to %@", self.apiPath]; -} - -#pragma mark - IBActions - -- (IBAction)showAlbum:(id)sender -{ - int tag = [sender tag]; - - [[ABRouter sharedRouter] navigateTo:[NSString stringWithFormat:@"/albums/%d", tag] withNavigationController:self.navigationController]; -} - -@end diff --git a/Example/View Controllers/AlbumListViewController.xib b/Example/View Controllers/AlbumListViewController.xib deleted file mode 100644 index 0e6a7b9..0000000 --- a/Example/View Controllers/AlbumListViewController.xib +++ /dev/null @@ -1,351 +0,0 @@ - - - - 1056 - 11B26 - 1617 - 1138 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 534 - - - YES - IBUIButton - IBUIView - IBUILabel - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {{20, 35}, {280, 21}} - - - - _NS:311 - NO - YES - 7 - NO - IBCocoaTouchFramework - Label - - 1 - MCAwIDAAA - - - 1 - 10 - 1 - - - - 292 - {{33, 99}, {254, 37}} - - - - _NS:222 - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - 1 - View Photo Album: WWDC 2011 - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - - - 292 - {{33, 144}, {254, 37}} - - - - _NS:222 - NO - 2 - IBCocoaTouchFramework - 0 - 0 - - 1 - View Photo Album: Seattle - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - 292 - {{33, 189}, {254, 37}} - - - - _NS:222 - NO - 3 - IBCocoaTouchFramework - 0 - 0 - - 1 - View Photo Album: Maui - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - {{0, 20}, {320, 460}} - - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - pathLabel - - - - 5 - - - - showAlbum: - - - 7 - - 9 - - - - showAlbum: - - - 7 - - 10 - - - - showAlbum: - - - 7 - - 11 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 4.IBPluginDependency - 6.IBPluginDependency - 7.IBPluginDependency - 8.IBPluginDependency - - - YES - AlbumListViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 11 - - - - YES - - AlbumListViewController - UIViewController - - showAlbum: - id - - - showAlbum: - - showAlbum: - id - - - - pathLabel - UILabel - - - pathLabel - - pathLabel - UILabel - - - - IBProjectSource - ./Classes/AlbumListViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 534 - - diff --git a/Example/View Controllers/ObjectViewController.h b/Example/View Controllers/ObjectViewController.h deleted file mode 100644 index cc66910..0000000 --- a/Example/View Controllers/ObjectViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ObjectViewController.h -// Example -// -// Created by Pierre on 25/11/12. -// Copyright (c) 2012 Structlab LLC. All rights reserved. -// - -#import - -@interface ObjectViewController : UIViewController -@property (nonatomic, retain) NSString *apiPath; -@property (nonatomic, retain) NSDictionary *parameters; -@property (nonatomic,retain) IBOutlet UILabel *dateLabel; -@end diff --git a/Example/View Controllers/ObjectViewController.m b/Example/View Controllers/ObjectViewController.m deleted file mode 100644 index ed38869..0000000 --- a/Example/View Controllers/ObjectViewController.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// ObjectViewController.m -// Example -// -// Created by Pierre on 25/11/12. -// Copyright (c) 2012 Structlab LLC. All rights reserved. -// - -#import "ObjectViewController.h" - -@interface ObjectViewController () - -@end - -@implementation ObjectViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - - // Custom initialization - } - return self; -} - -- (void)dealloc -{ - self.parameters = nil; - self.apiPath = nil; - - [super dealloc]; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - NSDate *date = [self.parameters objectForKey:@"date"]; - [self.dateLabel setText:[NSString stringWithFormat:@"%@",date]]; - // Do any additional setup after loading the view from its nib. -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/Example/View Controllers/ObjectViewController.xib b/Example/View Controllers/ObjectViewController.xib deleted file mode 100644 index 040b613..0000000 --- a/Example/View Controllers/ObjectViewController.xib +++ /dev/null @@ -1,292 +0,0 @@ - - - - 1536 - 12C31a - 2843 - 1187.2 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1929 - - - IBNSLayoutConstraint - IBProxyObject - IBUILabel - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - - - 292 - {{39, 263}, {261, 21}} - - - _NS:9 - NO - YES - 7 - NO - IBCocoaTouchFramework - Label - - 1 - MCAwIDAAA - darkTextColor - - - 0 - 1 - - 1 - 17 - - - Helvetica - 17 - 16 - - NO - - - {{0, 20}, {320, 548}} - - - - 3 - MQA - - 2 - - - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4 Full Screen - 2 - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - dateLabel - - - - 8 - - - - - - 0 - - - - - - 1 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 263 - - 1000 - - 3 - 9 - 3 - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 7 - 0 - - 0 - 1 - - 261 - - 1000 - - 3 - 9 - 1 - - - - - - 7 - - - - - 11 - - - - - 12 - - - - - - - ObjectViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 12 - - - - - ABViewController - UIViewController - - IBProjectSource - ./Classes/ABViewController.h - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - ObjectViewController - ABViewController - - dateLabel - UILabel - - - dateLabel - - dateLabel - UILabel - - - - IBProjectSource - ./Classes/ObjectViewController.h - - - - - 0 - IBCocoaTouchFramework - YES - 3 - YES - 1929 - - diff --git a/Example/View Controllers/PhotoListViewController.h b/Example/View Controllers/PhotoListViewController.h deleted file mode 100644 index 9536dc3..0000000 --- a/Example/View Controllers/PhotoListViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// PhotoListViewController.h -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface PhotoListViewController : UIViewController -@property (nonatomic, retain) NSString *apiPath; -@property (nonatomic,retain) IBOutlet UILabel *pathLabel; -- (IBAction)showPhoto:(id)sender; -@end diff --git a/Example/View Controllers/PhotoListViewController.m b/Example/View Controllers/PhotoListViewController.m deleted file mode 100644 index bca771c..0000000 --- a/Example/View Controllers/PhotoListViewController.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// PhotoListViewController.m -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "PhotoListViewController.h" - -@implementation PhotoListViewController -@synthesize apiPath; -@synthesize pathLabel; - -- (id)init -{ - self = [super initWithNibName:@"PhotoListViewController" bundle:nil]; - if (self) - { - self.title = NSStringFromClass([self class]); - } - return self; -} - -- (void)dealloc -{ - self.apiPath = nil; - [super dealloc]; -} - -#pragma mark - View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.pathLabel.text = [NSString stringWithFormat:@"Welcome to %@", self.apiPath]; -} - -- (IBAction)showPhoto:(id)sender -{ - [[ABRouter sharedRouter] navigateTo:[NSString stringWithFormat:@"/photos/%d", [sender tag]] withNavigationController:self.navigationController]; -} - -@end diff --git a/Example/View Controllers/PhotoListViewController.xib b/Example/View Controllers/PhotoListViewController.xib deleted file mode 100644 index 226bd9c..0000000 --- a/Example/View Controllers/PhotoListViewController.xib +++ /dev/null @@ -1,310 +0,0 @@ - - - - 1056 - 11B26 - 1617 - 1138 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 534 - - - YES - IBUIButton - IBUIView - IBUILabel - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {{20, 39}, {280, 21}} - - - - _NS:311 - NO - YES - 7 - NO - IBCocoaTouchFramework - Label - - 1 - MCAwIDAAA - - - 1 - 10 - 1 - - - - 292 - {{96, 101}, {129, 37}} - - - - _NS:222 - NO - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - 1 - Here's a photo - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - - - 292 - {{96, 146}, {129, 37}} - - - - _NS:222 - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - 1 - And another - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - {{0, 20}, {320, 460}} - - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - pathLabel - - - - 5 - - - - showPhoto: - - - 7 - - 9 - - - - showPhoto: - - - 7 - - 10 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 6 - - - - - 7 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 4.IBPluginDependency - 6.IBPluginDependency - 7.IBPluginDependency - - - YES - PhotoListViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 10 - - - - YES - - PhotoListViewController - UIViewController - - showPhoto: - id - - - showPhoto: - - showPhoto: - id - - - - pathLabel - UILabel - - - pathLabel - - pathLabel - UILabel - - - - IBProjectSource - ./Classes/PhotoListViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 534 - - diff --git a/Example/View Controllers/PhotoViewController.h b/Example/View Controllers/PhotoViewController.h deleted file mode 100644 index eca613e..0000000 --- a/Example/View Controllers/PhotoViewController.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// PhotoViewController.h -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface PhotoViewController : UIViewController -@property (nonatomic, retain) NSString *apiPath; -@property (nonatomic,retain) IBOutlet UILabel *pathLabel; -@end diff --git a/Example/View Controllers/PhotoViewController.m b/Example/View Controllers/PhotoViewController.m deleted file mode 100644 index 2df602c..0000000 --- a/Example/View Controllers/PhotoViewController.m +++ /dev/null @@ -1,39 +0,0 @@ -// -// PhotoViewController.m -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "PhotoViewController.h" - -@implementation PhotoViewController -@synthesize apiPath; -@synthesize pathLabel; - -- (id)init -{ - self = [super initWithNibName:@"PhotoViewController" bundle:nil]; - if (self) - { - self.title = NSStringFromClass([self class]); - } - return self; -} - -- (void)dealloc -{ - self.apiPath = nil; - [super dealloc]; -} - -#pragma mark - View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.pathLabel.text = [NSString stringWithFormat:@"Welcome to %@", self.apiPath]; -} - -@end diff --git a/Example/View Controllers/PhotoViewController.xib b/Example/View Controllers/PhotoViewController.xib deleted file mode 100644 index f5f7607..0000000 --- a/Example/View Controllers/PhotoViewController.xib +++ /dev/null @@ -1,207 +0,0 @@ - - - - 1056 - 11B26 - 1617 - 1138 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 534 - - - YES - IBProxyObject - IBUIView - IBUILabel - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {{20, 129}, {280, 21}} - - - _NS:311 - NO - YES - 7 - NO - IBCocoaTouchFramework - Label - - 1 - MCAwIDAAA - - - 1 - 10 - 1 - - - {{0, 20}, {320, 460}} - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - pathLabel - - - - 5 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 4.IBPluginDependency - - - YES - PhotoViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 5 - - - - YES - - PhotoViewController - UIViewController - - pathLabel - UILabel - - - pathLabel - - pathLabel - UILabel - - - - IBProjectSource - ./Classes/PhotoViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 534 - - diff --git a/Example/View Controllers/RootViewController.h b/Example/View Controllers/RootViewController.h deleted file mode 100644 index 5b193b7..0000000 --- a/Example/View Controllers/RootViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// RootViewController.h -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface RootViewController : UIViewController -- (IBAction)viewAlbums:(id)sender; -- (IBAction)viewPhotos:(id)sender; -- (IBAction)viewObject:(id)sender; -- (IBAction)modal:(id)sender; -@end diff --git a/Example/View Controllers/RootViewController.m b/Example/View Controllers/RootViewController.m deleted file mode 100644 index 7765be2..0000000 --- a/Example/View Controllers/RootViewController.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// RootViewController.m -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "RootViewController.h" - -@implementation RootViewController - -- (id)init -{ - self = [super initWithNibName:@"RootViewController" bundle:nil]; - if (self) - { - self.title = NSStringFromClass([self class]); - } - return self; -} - -#pragma mark - IBActions - -- (IBAction)viewAlbums:(id)sender -{ - [[ABRouter sharedRouter] navigateTo:@"/albums" withNavigationController:self.navigationController]; -} - -- (IBAction)viewPhotos:(id)sender -{ - [[ABRouter sharedRouter] navigateTo:@"/photos" navigationController:self.navigationController parameters:nil]; -} - -- (IBAction)viewObject:(id)sender -{ - NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:[NSDate date],@"date",nil]; - [[ABRouter sharedRouter] navigateTo:@"/object" navigationController:self.navigationController parameters:query]; -} - - -- (IBAction)modal:(id)sender -{ - [[ABRouter sharedRouter] modallyPresent:@"/photos" from:self]; -} - -@end diff --git a/Example/View Controllers/RootViewController.xib b/Example/View Controllers/RootViewController.xib deleted file mode 100644 index 2efc626..0000000 --- a/Example/View Controllers/RootViewController.xib +++ /dev/null @@ -1,382 +0,0 @@ - - - - 1536 - 12C31a - 2843 - 1187.2 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1929 - - - YES - IBProxyObject - IBUIButton - IBUIView - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {{80, 48}, {160, 37}} - - - - _NS:222 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - View some albums - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - Helvetica-Bold - Helvetica - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - - 292 - {{80, 101}, {160, 37}} - - - - _NS:222 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - View some photos - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - 292 - {{74, 178}, {173, 37}} - - - - _NS:222 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - How about a modal? - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - 292 - {{24, 297}, {273, 44}} - - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - Transmit some object (NSDate e.g) - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - 2 - 15 - - - - - {{0, 20}, {320, 460}} - - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - viewAlbums: - - - 7 - - 6 - - - - viewPhotos: - - - 7 - - 7 - - - - modal: - - - 7 - - 9 - - - - viewObject: - - - 7 - - 11 - - - - - YES - - 0 - - YES - - - - - - 1 - - - YES - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 8 - - - - - 10 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 10.IBPluginDependency - 4.IBPluginDependency - 5.IBPluginDependency - 8.IBPluginDependency - - - YES - RootViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 11 - - - - YES - - RootViewController - UIViewController - - YES - - YES - modal: - viewAlbums: - viewObject: - viewPhotos: - - - YES - id - id - id - id - - - - YES - - YES - modal: - viewAlbums: - viewObject: - viewPhotos: - - - YES - - modal: - id - - - viewAlbums: - id - - - viewObject: - id - - - viewPhotos: - id - - - - - IBProjectSource - ./Classes/RootViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 1929 - - diff --git a/Example/en.lproj/InfoPlist.strings b/Example/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/Example/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Example/en.lproj/MainWindow.xib b/Example/en.lproj/MainWindow.xib deleted file mode 100644 index 9483633..0000000 --- a/Example/en.lproj/MainWindow.xib +++ /dev/null @@ -1,198 +0,0 @@ - - - - 800 - 10D540 - 760 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 81 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - - 1316 - - {320, 480} - - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - - YES - - 0 - - - - - - 2 - - - YES - - - - - -1 - - - File's Owner - - - 3 - - - - - -2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - - - YES - UIApplication - UIResponder - - YES - - - YES - - - {{198, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - ExampleAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 9 - - - - YES - - ExampleAppDelegate - NSObject - - window - UIWindow - - - IBProjectSource - ExampleAppDelegate.h - - - - ExampleAppDelegate - NSObject - - IBUserSource - - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - Example.xcodeproj - 3 - 81 - - diff --git a/Example/main.m b/Example/main.m deleted file mode 100644 index 30e6a46..0000000 --- a/Example/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// Example -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/GowallaExample/GowallaExample.xcodeproj/project.pbxproj b/GowallaExample/GowallaExample.xcodeproj/project.pbxproj deleted file mode 100644 index 573f424..0000000 --- a/GowallaExample/GowallaExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,452 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 9305BFD0141478F80052A06F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BFCF141478F80052A06F /* UIKit.framework */; }; - 9305BFD2141478F80052A06F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BFD1141478F80052A06F /* Foundation.framework */; }; - 9305BFD4141478F80052A06F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305BFD3141478F80052A06F /* CoreGraphics.framework */; }; - 9305BFDA141478F80052A06F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9305BFD8141478F80052A06F /* InfoPlist.strings */; }; - 9305BFDC141478F80052A06F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFDB141478F80052A06F /* main.m */; }; - 9305BFE0141478F80052A06F /* GowallaExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFDF141478F80052A06F /* GowallaExampleAppDelegate.m */; }; - 9305BFE3141478F80052A06F /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9305BFE1141478F80052A06F /* MainWindow.xib */; }; - 9305BFEC1414790A0052A06F /* ABRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFEB1414790A0052A06F /* ABRouter.m */; }; - 9305BFF01414791F0052A06F /* SOCKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFEF1414791E0052A06F /* SOCKit.m */; }; - 9305BFF3141479BE0052A06F /* AFGowallaAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFF2141479BE0052A06F /* AFGowallaAPIClient.m */; }; - 9305C00B14147A860052A06F /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFF614147A860052A06F /* AFHTTPRequestOperation.m */; }; - 9305C00C14147A860052A06F /* AFImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFF814147A860052A06F /* AFImageCache.m */; }; - 9305C00D14147A860052A06F /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFFA14147A860052A06F /* AFImageRequestOperation.m */; }; - 9305C00E14147A860052A06F /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFFC14147A860052A06F /* AFJSONRequestOperation.m */; }; - 9305C00F14147A860052A06F /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305BFFE14147A860052A06F /* AFNetworkActivityIndicatorManager.m */; }; - 9305C01014147A860052A06F /* AFRestClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C00014147A860052A06F /* AFRestClient.m */; }; - 9305C01114147A860052A06F /* NSData+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C00214147A860052A06F /* NSData+AFNetworking.m */; }; - 9305C01214147A860052A06F /* NSMutableURLRequest+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C00414147A860052A06F /* NSMutableURLRequest+AFNetworking.m */; }; - 9305C01314147A860052A06F /* NSString+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C00614147A860052A06F /* NSString+AFNetworking.m */; }; - 9305C01414147A860052A06F /* UIImage+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C00814147A860052A06F /* UIImage+AFNetworking.m */; }; - 9305C01514147A860052A06F /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C00A14147A860052A06F /* UIImageView+AFNetworking.m */; }; - 9305C05714147AD50052A06F /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C03E14147AD50052A06F /* JSONKit.m */; }; - 9305C05A14147AF90052A06F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305C05914147AF90052A06F /* libz.dylib */; }; - 9305C06014147DB20052A06F /* SpotsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C05F14147DB20052A06F /* SpotsTableViewController.m */; }; - 9305C0631414804A0052A06F /* CheckinsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9305C0621414804A0052A06F /* CheckinsTableViewController.m */; }; - 93ADBB7C14155F6000553E08 /* empty_50.png in Resources */ = {isa = PBXBuildFile; fileRef = 93ADBB7B14155F6000553E08 /* empty_50.png */; }; - 93ADBB811415622C00553E08 /* SpotViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93ADBB7F1415622C00553E08 /* SpotViewController.m */; }; - 93ADBB821415622C00553E08 /* SpotViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93ADBB801415622C00553E08 /* SpotViewController.xib */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 9305BFCB141478F80052A06F /* GowallaExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GowallaExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9305BFCF141478F80052A06F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 9305BFD1141478F80052A06F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 9305BFD3141478F80052A06F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 9305BFD7141478F80052A06F /* GowallaExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GowallaExample-Info.plist"; sourceTree = ""; }; - 9305BFD9141478F80052A06F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9305BFDB141478F80052A06F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9305BFDD141478F80052A06F /* GowallaExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GowallaExample-Prefix.pch"; sourceTree = ""; }; - 9305BFDE141478F80052A06F /* GowallaExampleAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GowallaExampleAppDelegate.h; sourceTree = ""; }; - 9305BFDF141478F80052A06F /* GowallaExampleAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GowallaExampleAppDelegate.m; sourceTree = ""; }; - 9305BFE2141478F80052A06F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - 9305BFEA1414790A0052A06F /* ABRouter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABRouter.h; path = ../ABRouter/ABRouter.h; sourceTree = ""; }; - 9305BFEB1414790A0052A06F /* ABRouter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ABRouter.m; path = ../ABRouter/ABRouter.m; sourceTree = ""; }; - 9305BFEE1414791E0052A06F /* SOCKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SOCKit.h; path = ../SOCKit/SOCKit.h; sourceTree = ""; }; - 9305BFEF1414791E0052A06F /* SOCKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SOCKit.m; path = ../SOCKit/SOCKit.m; sourceTree = ""; }; - 9305BFF1141479BE0052A06F /* AFGowallaAPIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFGowallaAPIClient.h; sourceTree = ""; }; - 9305BFF2141479BE0052A06F /* AFGowallaAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFGowallaAPIClient.m; sourceTree = ""; }; - 9305BFF514147A860052A06F /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = ""; }; - 9305BFF614147A860052A06F /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = ""; }; - 9305BFF714147A860052A06F /* AFImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageCache.h; sourceTree = ""; }; - 9305BFF814147A860052A06F /* AFImageCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageCache.m; sourceTree = ""; }; - 9305BFF914147A860052A06F /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = ""; }; - 9305BFFA14147A860052A06F /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = ""; }; - 9305BFFB14147A860052A06F /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = ""; }; - 9305BFFC14147A860052A06F /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = ""; }; - 9305BFFD14147A860052A06F /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = ""; }; - 9305BFFE14147A860052A06F /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = ""; }; - 9305BFFF14147A860052A06F /* AFRestClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFRestClient.h; sourceTree = ""; }; - 9305C00014147A860052A06F /* AFRestClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFRestClient.m; sourceTree = ""; }; - 9305C00114147A860052A06F /* NSData+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+AFNetworking.h"; sourceTree = ""; }; - 9305C00214147A860052A06F /* NSData+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+AFNetworking.m"; sourceTree = ""; }; - 9305C00314147A860052A06F /* NSMutableURLRequest+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableURLRequest+AFNetworking.h"; sourceTree = ""; }; - 9305C00414147A860052A06F /* NSMutableURLRequest+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableURLRequest+AFNetworking.m"; sourceTree = ""; }; - 9305C00514147A860052A06F /* NSString+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+AFNetworking.h"; sourceTree = ""; }; - 9305C00614147A860052A06F /* NSString+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AFNetworking.m"; sourceTree = ""; }; - 9305C00714147A860052A06F /* UIImage+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+AFNetworking.h"; sourceTree = ""; }; - 9305C00814147A860052A06F /* UIImage+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+AFNetworking.m"; sourceTree = ""; }; - 9305C00914147A860052A06F /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = ""; }; - 9305C00A14147A860052A06F /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = ""; }; - 9305C03D14147AD50052A06F /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = ""; }; - 9305C03E14147AD50052A06F /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = ""; }; - 9305C05914147AF90052A06F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 9305C05E14147DB20052A06F /* SpotsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpotsTableViewController.h; sourceTree = ""; }; - 9305C05F14147DB20052A06F /* SpotsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpotsTableViewController.m; sourceTree = ""; }; - 9305C0611414804A0052A06F /* CheckinsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckinsTableViewController.h; sourceTree = ""; }; - 9305C0621414804A0052A06F /* CheckinsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CheckinsTableViewController.m; sourceTree = ""; }; - 93ADBB7B14155F6000553E08 /* empty_50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty_50.png; sourceTree = ""; }; - 93ADBB7E1415622C00553E08 /* SpotViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpotViewController.h; sourceTree = ""; }; - 93ADBB7F1415622C00553E08 /* SpotViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpotViewController.m; sourceTree = ""; }; - 93ADBB801415622C00553E08 /* SpotViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SpotViewController.xib; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9305BFC8141478F80052A06F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9305C05A14147AF90052A06F /* libz.dylib in Frameworks */, - 9305BFD0141478F80052A06F /* UIKit.framework in Frameworks */, - 9305BFD2141478F80052A06F /* Foundation.framework in Frameworks */, - 9305BFD4141478F80052A06F /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9305BFC0141478F80052A06F = { - isa = PBXGroup; - children = ( - 9305BFED141479120052A06F /* SOCKit */, - 9305BFE9141478FD0052A06F /* ABRouter */, - 9305BFD5141478F80052A06F /* GowallaExample */, - 9305BFCE141478F80052A06F /* Frameworks */, - 9305BFCC141478F80052A06F /* Products */, - ); - sourceTree = ""; - }; - 9305BFCC141478F80052A06F /* Products */ = { - isa = PBXGroup; - children = ( - 9305BFCB141478F80052A06F /* GowallaExample.app */, - ); - name = Products; - sourceTree = ""; - }; - 9305BFCE141478F80052A06F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9305C05914147AF90052A06F /* libz.dylib */, - 9305BFCF141478F80052A06F /* UIKit.framework */, - 9305BFD1141478F80052A06F /* Foundation.framework */, - 9305BFD3141478F80052A06F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9305BFD5141478F80052A06F /* GowallaExample */ = { - isa = PBXGroup; - children = ( - 93ADBB7A14155F6000553E08 /* images */, - 9305C05D14147D910052A06F /* View Controllers */, - 9305C05B14147D720052A06F /* Libraries */, - 9305BFDE141478F80052A06F /* GowallaExampleAppDelegate.h */, - 9305BFDF141478F80052A06F /* GowallaExampleAppDelegate.m */, - 9305BFE1141478F80052A06F /* MainWindow.xib */, - 9305BFD6141478F80052A06F /* Supporting Files */, - 9305BFF1141479BE0052A06F /* AFGowallaAPIClient.h */, - 9305BFF2141479BE0052A06F /* AFGowallaAPIClient.m */, - ); - path = GowallaExample; - sourceTree = ""; - }; - 9305BFD6141478F80052A06F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9305BFD7141478F80052A06F /* GowallaExample-Info.plist */, - 9305BFD8141478F80052A06F /* InfoPlist.strings */, - 9305BFDB141478F80052A06F /* main.m */, - 9305BFDD141478F80052A06F /* GowallaExample-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9305BFE9141478FD0052A06F /* ABRouter */ = { - isa = PBXGroup; - children = ( - 9305BFEA1414790A0052A06F /* ABRouter.h */, - 9305BFEB1414790A0052A06F /* ABRouter.m */, - ); - name = ABRouter; - sourceTree = ""; - }; - 9305BFED141479120052A06F /* SOCKit */ = { - isa = PBXGroup; - children = ( - 9305BFEE1414791E0052A06F /* SOCKit.h */, - 9305BFEF1414791E0052A06F /* SOCKit.m */, - ); - name = SOCKit; - sourceTree = ""; - }; - 9305BFF414147A860052A06F /* AFNetworking */ = { - isa = PBXGroup; - children = ( - 9305BFF514147A860052A06F /* AFHTTPRequestOperation.h */, - 9305BFF614147A860052A06F /* AFHTTPRequestOperation.m */, - 9305BFF714147A860052A06F /* AFImageCache.h */, - 9305BFF814147A860052A06F /* AFImageCache.m */, - 9305BFF914147A860052A06F /* AFImageRequestOperation.h */, - 9305BFFA14147A860052A06F /* AFImageRequestOperation.m */, - 9305BFFB14147A860052A06F /* AFJSONRequestOperation.h */, - 9305BFFC14147A860052A06F /* AFJSONRequestOperation.m */, - 9305BFFD14147A860052A06F /* AFNetworkActivityIndicatorManager.h */, - 9305BFFE14147A860052A06F /* AFNetworkActivityIndicatorManager.m */, - 9305BFFF14147A860052A06F /* AFRestClient.h */, - 9305C00014147A860052A06F /* AFRestClient.m */, - 9305C00114147A860052A06F /* NSData+AFNetworking.h */, - 9305C00214147A860052A06F /* NSData+AFNetworking.m */, - 9305C00314147A860052A06F /* NSMutableURLRequest+AFNetworking.h */, - 9305C00414147A860052A06F /* NSMutableURLRequest+AFNetworking.m */, - 9305C00514147A860052A06F /* NSString+AFNetworking.h */, - 9305C00614147A860052A06F /* NSString+AFNetworking.m */, - 9305C00714147A860052A06F /* UIImage+AFNetworking.h */, - 9305C00814147A860052A06F /* UIImage+AFNetworking.m */, - 9305C00914147A860052A06F /* UIImageView+AFNetworking.h */, - 9305C00A14147A860052A06F /* UIImageView+AFNetworking.m */, - ); - name = AFNetworking; - path = Libraries/AFNetworking/AFNetworking; - sourceTree = SOURCE_ROOT; - }; - 9305C01614147AD50052A06F /* JSONKit */ = { - isa = PBXGroup; - children = ( - 9305C03D14147AD50052A06F /* JSONKit.h */, - 9305C03E14147AD50052A06F /* JSONKit.m */, - ); - name = JSONKit; - path = Libraries/JSONKit; - sourceTree = SOURCE_ROOT; - }; - 9305C05B14147D720052A06F /* Libraries */ = { - isa = PBXGroup; - children = ( - 9305C01614147AD50052A06F /* JSONKit */, - 9305BFF414147A860052A06F /* AFNetworking */, - ); - name = Libraries; - sourceTree = ""; - }; - 9305C05D14147D910052A06F /* View Controllers */ = { - isa = PBXGroup; - children = ( - 9305C05E14147DB20052A06F /* SpotsTableViewController.h */, - 9305C05F14147DB20052A06F /* SpotsTableViewController.m */, - 9305C0611414804A0052A06F /* CheckinsTableViewController.h */, - 9305C0621414804A0052A06F /* CheckinsTableViewController.m */, - 93ADBB7E1415622C00553E08 /* SpotViewController.h */, - 93ADBB7F1415622C00553E08 /* SpotViewController.m */, - 93ADBB801415622C00553E08 /* SpotViewController.xib */, - ); - path = "View Controllers"; - sourceTree = ""; - }; - 93ADBB7A14155F6000553E08 /* images */ = { - isa = PBXGroup; - children = ( - 93ADBB7B14155F6000553E08 /* empty_50.png */, - ); - path = images; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9305BFCA141478F80052A06F /* GowallaExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9305BFE6141478F80052A06F /* Build configuration list for PBXNativeTarget "GowallaExample" */; - buildPhases = ( - 9305BFC7141478F80052A06F /* Sources */, - 9305BFC8141478F80052A06F /* Frameworks */, - 9305BFC9141478F80052A06F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GowallaExample; - productName = GowallaExample; - productReference = 9305BFCB141478F80052A06F /* GowallaExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9305BFC2141478F80052A06F /* Project object */ = { - isa = PBXProject; - attributes = { - ORGANIZATIONNAME = "Structlab LLC"; - }; - buildConfigurationList = 9305BFC5141478F80052A06F /* Build configuration list for PBXProject "GowallaExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9305BFC0141478F80052A06F; - productRefGroup = 9305BFCC141478F80052A06F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9305BFCA141478F80052A06F /* GowallaExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9305BFC9141478F80052A06F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9305BFDA141478F80052A06F /* InfoPlist.strings in Resources */, - 9305BFE3141478F80052A06F /* MainWindow.xib in Resources */, - 93ADBB7C14155F6000553E08 /* empty_50.png in Resources */, - 93ADBB821415622C00553E08 /* SpotViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9305BFC7141478F80052A06F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9305BFDC141478F80052A06F /* main.m in Sources */, - 9305BFE0141478F80052A06F /* GowallaExampleAppDelegate.m in Sources */, - 9305BFEC1414790A0052A06F /* ABRouter.m in Sources */, - 9305BFF01414791F0052A06F /* SOCKit.m in Sources */, - 9305BFF3141479BE0052A06F /* AFGowallaAPIClient.m in Sources */, - 9305C00B14147A860052A06F /* AFHTTPRequestOperation.m in Sources */, - 9305C00C14147A860052A06F /* AFImageCache.m in Sources */, - 9305C00D14147A860052A06F /* AFImageRequestOperation.m in Sources */, - 9305C00E14147A860052A06F /* AFJSONRequestOperation.m in Sources */, - 9305C00F14147A860052A06F /* AFNetworkActivityIndicatorManager.m in Sources */, - 9305C01014147A860052A06F /* AFRestClient.m in Sources */, - 9305C01114147A860052A06F /* NSData+AFNetworking.m in Sources */, - 9305C01214147A860052A06F /* NSMutableURLRequest+AFNetworking.m in Sources */, - 9305C01314147A860052A06F /* NSString+AFNetworking.m in Sources */, - 9305C01414147A860052A06F /* UIImage+AFNetworking.m in Sources */, - 9305C01514147A860052A06F /* UIImageView+AFNetworking.m in Sources */, - 9305C05714147AD50052A06F /* JSONKit.m in Sources */, - 9305C06014147DB20052A06F /* SpotsTableViewController.m in Sources */, - 9305C0631414804A0052A06F /* CheckinsTableViewController.m in Sources */, - 93ADBB811415622C00553E08 /* SpotViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 9305BFD8141478F80052A06F /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9305BFD9141478F80052A06F /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 9305BFE1141478F80052A06F /* MainWindow.xib */ = { - isa = PBXVariantGroup; - children = ( - 9305BFE2141478F80052A06F /* en */, - ); - name = MainWindow.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9305BFE4141478F80052A06F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 9305BFE5141478F80052A06F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 9305BFE7141478F80052A06F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "GowallaExample/GowallaExample-Prefix.pch"; - INFOPLIST_FILE = "GowallaExample/GowallaExample-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 9305BFE8141478F80052A06F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "GowallaExample/GowallaExample-Prefix.pch"; - INFOPLIST_FILE = "GowallaExample/GowallaExample-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9305BFC5141478F80052A06F /* Build configuration list for PBXProject "GowallaExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9305BFE4141478F80052A06F /* Debug */, - 9305BFE5141478F80052A06F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9305BFE6141478F80052A06F /* Build configuration list for PBXNativeTarget "GowallaExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9305BFE7141478F80052A06F /* Debug */, - 9305BFE8141478F80052A06F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9305BFC2141478F80052A06F /* Project object */; -} diff --git a/GowallaExample/GowallaExample/AFGowallaAPIClient.h b/GowallaExample/GowallaExample/AFGowallaAPIClient.h deleted file mode 100644 index 86600c9..0000000 --- a/GowallaExample/GowallaExample/AFGowallaAPIClient.h +++ /dev/null @@ -1,31 +0,0 @@ -// AFGowallaAPI.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFRestClient.h" - -extern NSString * const kAFGowallaClientID; -extern NSString * const kAFGowallaBaseURLString; - -@interface AFGowallaAPIClient : AFRestClient -+ (id)sharedClient; -@end diff --git a/GowallaExample/GowallaExample/AFGowallaAPIClient.m b/GowallaExample/GowallaExample/AFGowallaAPIClient.m deleted file mode 100644 index 9bd9daa..0000000 --- a/GowallaExample/GowallaExample/AFGowallaAPIClient.m +++ /dev/null @@ -1,66 +0,0 @@ -// AFGowallaAPI.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFGowallaAPIClient.h" - -static AFGowallaAPIClient *_sharedClient = nil; - -// Replace this with your own API Key, available at http://api.gowalla.com/api/keys/ -NSString * const kAFGowallaClientID = @"fa574894bddc43aa96c556eb457b4009"; - -NSString * const kAFGowallaBaseURLString = @"https://api.gowalla.com/"; - -@implementation AFGowallaAPIClient - -+ (id)sharedClient { - if (_sharedClient == nil) { - @synchronized(self) { - _sharedClient = [[self alloc] init]; - } - } - - return _sharedClient; -} - -- (id)init { - self = [super init]; - if (!self) { - return nil; - } - - // X-Gowalla-API-Key HTTP Header; see http://api.gowalla.com/api/docs - [self setDefaultHeader:@"X-Gowalla-API-Key" value:kAFGowallaClientID]; - - // X-Gowalla-API-Version HTTP Header; see http://api.gowalla.com/api/docs - [self setDefaultHeader:@"X-Gowalla-API-Version" value:@"1"]; - - // X-UDID HTTP Header - [self setDefaultHeader:@"X-UDID" value:[[UIDevice currentDevice] uniqueIdentifier]]; - - return self; -} - -+ (NSURL *)baseURL { - return [NSURL URLWithString:kAFGowallaBaseURLString]; -} - -@end diff --git a/GowallaExample/GowallaExample/GowallaExample-Info.plist b/GowallaExample/GowallaExample/GowallaExample-Info.plist deleted file mode 100644 index 2f07f4b..0000000 --- a/GowallaExample/GowallaExample/GowallaExample-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.structlab.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/GowallaExample/GowallaExample/GowallaExample-Prefix.pch b/GowallaExample/GowallaExample/GowallaExample-Prefix.pch deleted file mode 100644 index e2e5d52..0000000 --- a/GowallaExample/GowallaExample/GowallaExample-Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -// -// Prefix header for all source files of the 'GowallaExample' target in the 'GowallaExample' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif - -#import "ABRouter.h" -#import "AFGowallaAPIClient.h" \ No newline at end of file diff --git a/GowallaExample/GowallaExample/GowallaExampleAppDelegate.h b/GowallaExample/GowallaExample/GowallaExampleAppDelegate.h deleted file mode 100644 index 59feb7d..0000000 --- a/GowallaExample/GowallaExample/GowallaExampleAppDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// GowallaExampleAppDelegate.h -// GowallaExample -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@class SpotsTableViewController; - -@interface GowallaExampleAppDelegate : NSObject -@property(nonatomic,retain) SpotsTableViewController *spotsTableViewController; -@property(nonatomic,retain) UINavigationController *navigationController; -@property (nonatomic, retain) IBOutlet UIWindow *window; - -@end diff --git a/GowallaExample/GowallaExample/GowallaExampleAppDelegate.m b/GowallaExample/GowallaExample/GowallaExampleAppDelegate.m deleted file mode 100644 index 9cac720..0000000 --- a/GowallaExample/GowallaExample/GowallaExampleAppDelegate.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// GowallaExampleAppDelegate.m -// GowallaExample -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "GowallaExampleAppDelegate.h" -#import "SpotViewController.h" -#import "SpotsTableViewController.h" -#import "CheckinsTableViewController.h" - -@implementation GowallaExampleAppDelegate - -@synthesize window = _window; -@synthesize spotsTableViewController, navigationController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - [[ABRouter sharedRouter] match:@"/spots/:spot_id" to:[SpotViewController class]]; - [[ABRouter sharedRouter] match:@"/spots/:spot_id/events" to:[CheckinsTableViewController class]]; - - self.spotsTableViewController = [[[SpotsTableViewController alloc] initWithStyle:UITableViewStylePlain] autorelease]; - self.navigationController = [[[UINavigationController alloc] initWithRootViewController:self.spotsTableViewController] autorelease]; - [self.window addSubview:self.navigationController.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, this method is called instead of applicationWillTerminate: when the user quits. - */ -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - /* - Called as part of the 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. - Save data if appropriate. - See also applicationDidEnterBackground:. - */ -} - -- (void)dealloc -{ - self.spotsTableViewController = nil; - self.navigationController = nil; - - [_window release]; - [super dealloc]; -} - -@end diff --git a/GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.h b/GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.h deleted file mode 100644 index 81c7c45..0000000 --- a/GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// CheckinsTableViewController.h -// GowallaExample -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface CheckinsTableViewController : UITableViewController -@property(nonatomic,retain) NSMutableArray *tableData; -@property(nonatomic,retain) NSString *apiPath; -@end diff --git a/GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.m b/GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.m deleted file mode 100644 index 1769013..0000000 --- a/GowallaExample/GowallaExample/View Controllers/CheckinsTableViewController.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// CheckinsTableViewController.m -// GowallaExample -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "CheckinsTableViewController.h" - -@implementation CheckinsTableViewController -@synthesize tableData; -@synthesize apiPath; - -- (id)initWithStyle:(UITableViewStyle)style -{ - self = [super initWithStyle:style]; - if (self) - { - self.title = @"Checkins"; - } - return self; -} - -- (void)dealloc -{ - self.apiPath = nil; - [super dealloc]; -} - -#pragma mark - View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.tableData = [[[NSMutableArray alloc] init] autorelease]; - - [[AFGowallaAPIClient sharedClient] getPath:self.apiPath parameters:nil success:^(id response) { - - [self.tableData removeAllObjects]; - [self.tableData addObjectsFromArray:[response objectForKey:@"activity"]]; - [self.tableView reloadData]; - }]; -} - -- (void)viewDidUnload -{ - [super viewDidUnload]; - self.tableData = nil; -} - -#pragma mark - Table view data source - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [self.tableData count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - } - - NSDictionary *activity = [self.tableData objectAtIndex:indexPath.row]; - - NSString *activityType = [activity objectForKey:@"type"]; - NSString *activityUser = [[activity objectForKey:@"user"] objectForKey:@"first_name"]; - - cell.textLabel.text = [NSString stringWithFormat:@"%@ by %@", activityType, activityUser]; - - return cell; -} - -#pragma mark - Table view delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Navigation logic may go here. Create and push another view controller. - /* - <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; - // ... - // Pass the selected object to the new view controller. - [self.navigationController pushViewController:detailViewController animated:YES]; - [detailViewController release]; - */ -} - -@end diff --git a/GowallaExample/GowallaExample/View Controllers/SpotViewController.h b/GowallaExample/GowallaExample/View Controllers/SpotViewController.h deleted file mode 100644 index 657cf41..0000000 --- a/GowallaExample/GowallaExample/View Controllers/SpotViewController.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// SpotViewController.h -// GowallaExample -// -// Created by Aaron Brethorst on 9/5/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface SpotViewController : UIViewController -@property(nonatomic,retain) NSMutableArray *photoURLs; -@property(nonatomic,retain) IBOutlet UIImageView *categoryImage; -@property(nonatomic,retain) IBOutlet UILabel *businessName; -@property(nonatomic,retain) IBOutlet UIImageView *photoOne; -@property(nonatomic,retain) IBOutlet UIImageView *photoTwo; -@property(nonatomic,retain) IBOutlet UIImageView *photoThree; -@property(nonatomic,retain) IBOutlet UIImageView *photoFour; -@property(nonatomic,retain) IBOutlet UIImageView *photoFive; -@property(nonatomic,retain) NSString *apiPath; -@property(nonatomic,retain) NSDictionary *spot; -- (IBAction)viewCheckins:(id)sender; -@end diff --git a/GowallaExample/GowallaExample/View Controllers/SpotViewController.m b/GowallaExample/GowallaExample/View Controllers/SpotViewController.m deleted file mode 100644 index e0eb00e..0000000 --- a/GowallaExample/GowallaExample/View Controllers/SpotViewController.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// SpotViewController.m -// GowallaExample -// -// Created by Aaron Brethorst on 9/5/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "SpotViewController.h" -#import "UIImageView+AFNetworking.h" - -@implementation SpotViewController -@synthesize categoryImage, businessName; -@synthesize photoOne, photoTwo, photoThree, photoFour, photoFive; -@synthesize photoURLs; -@synthesize apiPath; -@synthesize spot; - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (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 - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.photoURLs = [NSMutableArray array]; - - [[AFGowallaAPIClient sharedClient] getPath:self.apiPath parameters:nil success:^(id response) { - self.spot = response; - self.businessName.text = [response objectForKey:@"name"]; - [self.categoryImage setImageWithURL:[NSURL URLWithString:[response objectForKey:@"image_url"]]]; - - [[AFGowallaAPIClient sharedClient] getPath:[response objectForKey:@"photos_url"] parameters:nil success:^(id response) { - - for (NSDictionary *p in [response objectForKey:@"activity"]) - { - NSString *url = [[p objectForKey:@"photo_urls"] objectForKey:@"square_50"]; - [self.photoURLs addObject:[NSURL URLWithString:url]]; - } - - if ([self.photoURLs count] > 0) - { - [self.photoOne setImageWithURL:[self.photoURLs objectAtIndex:0]]; - } - - if ([self.photoURLs count] > 1) - { - [self.photoOne setImageWithURL:[self.photoURLs objectAtIndex:1]]; - } - - if ([self.photoURLs count] > 2) - { - [self.photoOne setImageWithURL:[self.photoURLs objectAtIndex:2]]; - } - - if ([self.photoURLs count] > 3) - { - [self.photoOne setImageWithURL:[self.photoURLs objectAtIndex:3]]; - } - - if ([self.photoURLs count] > 4) - { - [self.photoOne setImageWithURL:[self.photoURLs objectAtIndex:4]]; - } - }]; - }]; -} - -#pragma mark - IBActions - -- (IBAction)viewCheckins:(id)sender -{ - [[ABRouter sharedRouter] navigateTo:[self.spot objectForKey:@"activity_url"] - withNavigationController:self.navigationController]; -} - -@end diff --git a/GowallaExample/GowallaExample/View Controllers/SpotViewController.xib b/GowallaExample/GowallaExample/View Controllers/SpotViewController.xib deleted file mode 100644 index 0ab0ab3..0000000 --- a/GowallaExample/GowallaExample/View Controllers/SpotViewController.xib +++ /dev/null @@ -1,495 +0,0 @@ - - - - 1056 - 11B26 - 1617 - 1138 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 534 - - - YES - IBUIButton - IBUIImageView - IBUIView - IBUILabel - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {{20, 20}, {100, 100}} - - - - _NS:541 - 2 - NO - IBCocoaTouchFramework - - - - 292 - {{142, 20}, {158, 42}} - - - - _NS:311 - NO - YES - 7 - NO - IBCocoaTouchFramework - - - Helvetica-Bold - 17 - 16 - - - 1 - MCAwIDAAA - - - 1 - 10 - 2 - - - - 292 - {{20, 197}, {50, 50}} - - - - _NS:541 - NO - IBCocoaTouchFramework - - - - 292 - {{78, 197}, {50, 50}} - - - - _NS:541 - NO - IBCocoaTouchFramework - - - - 292 - {{135, 197}, {50, 50}} - - - - _NS:541 - NO - IBCocoaTouchFramework - - - - 292 - {{193, 197}, {50, 50}} - - - - _NS:541 - NO - IBCocoaTouchFramework - - - - 292 - {{250, 197}, {50, 50}} - - - - _NS:541 - NO - IBCocoaTouchFramework - - - - 292 - {{20, 140}, {280, 37}} - - - - _NS:222 - NO - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - 1 - View Checkins - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - - {{0, 20}, {320, 460}} - - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - categoryImage - - - - 8 - - - - businessName - - - - 10 - - - - view - - - - 11 - - - - photoOne - - - - 17 - - - - photoTwo - - - - 18 - - - - photoThree - - - - 19 - - - - photoFour - - - - 20 - - - - photoFive - - - - 21 - - - - viewCheckins: - - - 7 - - 23 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 5 - - - - - 7 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 16 - - - - - 22 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 12.IBPluginDependency - 13.IBPluginDependency - 14.IBPluginDependency - 15.IBPluginDependency - 16.IBPluginDependency - 22.IBPluginDependency - 5.IBPluginDependency - 7.IBPluginDependency - - - YES - SpotViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 23 - - - - YES - - SpotViewController - UIViewController - - viewCheckins: - id - - - viewCheckins: - - viewCheckins: - id - - - - YES - - YES - businessName - categoryImage - photoFive - photoFour - photoOne - photoThree - photoTwo - - - YES - UILabel - UIImageView - UIImageView - UIImageView - UIImageView - UIImageView - UIImageView - - - - YES - - YES - businessName - categoryImage - photoFive - photoFour - photoOne - photoThree - photoTwo - - - YES - - businessName - UILabel - - - categoryImage - UIImageView - - - photoFive - UIImageView - - - photoFour - UIImageView - - - photoOne - UIImageView - - - photoThree - UIImageView - - - photoTwo - UIImageView - - - - - IBProjectSource - ./Classes/SpotViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 534 - - diff --git a/GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.h b/GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.h deleted file mode 100644 index b40c98e..0000000 --- a/GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// SpotsTableViewController.h -// GowallaExample -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface SpotsTableViewController : UITableViewController -@property(nonatomic,retain) NSMutableArray *tableData; -@end diff --git a/GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.m b/GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.m deleted file mode 100644 index 8215b62..0000000 --- a/GowallaExample/GowallaExample/View Controllers/SpotsTableViewController.m +++ /dev/null @@ -1,92 +0,0 @@ -// -// SpotsTableViewController.m -// GowallaExample -// -// Created by Aaron Brethorst on 9/4/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "SpotsTableViewController.h" -#import "UIImageView+AFNetworking.h" - -@implementation SpotsTableViewController -@synthesize tableData; - -- (id)initWithStyle:(UITableViewStyle)style -{ - self = [super initWithStyle:style]; - if (self) { - self.title = @"Spots"; - } - return self; -} - -- (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 - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.tableView.rowHeight = 60; - - self.tableData = [[[NSMutableArray alloc] init] autorelease]; - - [[AFGowallaAPIClient sharedClient] getPath:@"/spots" - parameters:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithFloat:47.623318], @"lat", [NSNumber numberWithFloat:-122.312937], @"lng", [NSNumber numberWithInt:50], @"radius", nil] - success:^(id response) { - [self.tableData addObjectsFromArray:[response objectForKey:@"spots"]]; - [self.tableView reloadData]; - } failure:^(NSError *error) { - UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil] autorelease]; - [alert show]; - }]; -} - -- (void)viewDidUnload -{ - [super viewDidUnload]; - self.tableData = nil; -} - -#pragma mark - Table view data source - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [self.tableData count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - NSDictionary *spot = [self.tableData objectAtIndex:indexPath.row]; - cell.textLabel.text = [spot objectForKey:@"name"]; - [cell.imageView setImageWithURL:[NSURL URLWithString:[spot objectForKey:@"_image_url_50"]] - placeholderImage:[UIImage imageNamed:@"empty_50.png"]]; - - return cell; -} - -#pragma mark - Table view delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [[ABRouter sharedRouter] navigateTo:[[self.tableData objectAtIndex:indexPath.row] objectForKey:@"url"] - withNavigationController:self.navigationController]; -} - -@end diff --git a/GowallaExample/GowallaExample/en.lproj/InfoPlist.strings b/GowallaExample/GowallaExample/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/GowallaExample/GowallaExample/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/GowallaExample/GowallaExample/en.lproj/MainWindow.xib b/GowallaExample/GowallaExample/en.lproj/MainWindow.xib deleted file mode 100644 index 5ceaa03..0000000 --- a/GowallaExample/GowallaExample/en.lproj/MainWindow.xib +++ /dev/null @@ -1,198 +0,0 @@ - - - - 800 - 10D540 - 760 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 81 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - - 1316 - - {320, 480} - - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - - YES - - 0 - - - - - - 2 - - - YES - - - - - -1 - - - File's Owner - - - 3 - - - - - -2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - - - YES - UIApplication - UIResponder - - YES - - - YES - - - {{198, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - GowallaExampleAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 9 - - - - YES - - GowallaExampleAppDelegate - NSObject - - window - UIWindow - - - IBProjectSource - GowallaExampleAppDelegate.h - - - - GowallaExampleAppDelegate - NSObject - - IBUserSource - - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - GowallaExample.xcodeproj - 3 - 81 - - diff --git a/GowallaExample/GowallaExample/images/empty_50.png b/GowallaExample/GowallaExample/images/empty_50.png deleted file mode 100644 index 2906721f9b528969e8e66ca61b8ba2e10bbe143f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 980 zcma)5O^ee&7>=y0%R&$0Ne?niy$Cj6{m3>nmTc16fGMRdTJYjDnYN*uOiZRWEr_59 z`e#HBBH}?j3W66;-o%3*7Cd=((rvmPtT>R&yu-0v~T40FYR+2m$O=Cm+f-; z?d`Jv<@(c?Y`aJs1KJ}aI!6)abe9Y26hJ+B*LJ~iv>rlh@c|zQn92c$~7R1k|>C> zAjt(uQH!!FieSAU^A@=ywQDxlzL=%K38kSb2=n=zpBH%&jRmP%t)?2XTwsVoya*^t z3PGID6iggDkrz^r1RzyJLo%ZpWRaev;D;O8AYPY=6--D_C`i1Rrj!9~``=LC-=JgK z#i#N9RXFZ1LM(J~OlFb88aK+Pu0qv_Frp;t6LOSQu`?l*#1j$%qgMtta=ak5S9sf2 ztstf-aIj@+kSXw<=c)&Kv#6KLho&eQlGG4&*_6#jsiKrBr30hV$hanPWh0BW49R*AFNVVz3s77x9Y9A?)F&ptz3ZxBczS}qtV$Fo1XNz8Czy- z1|J7(+9NjB5AJ;Z#-2pWGWCA)<@l3yp5yk;f>#f}zkc%gT<*t}U++I(fd8|UTilsl XF8^i+U43! - -int main(int argc, char *argv[]) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/GowallaExample/Libraries/AFNetworking b/GowallaExample/Libraries/AFNetworking deleted file mode 160000 index a167217..0000000 --- a/GowallaExample/Libraries/AFNetworking +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a167217ee60a01235bf29792a46a4e8645a7835e diff --git a/GowallaExample/Libraries/JSONKit b/GowallaExample/Libraries/JSONKit deleted file mode 160000 index c2146ff..0000000 --- a/GowallaExample/Libraries/JSONKit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c2146ffeb10d92bfa1537d2033a3235825d1b261 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 96e8227..0000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Aaron Brethorst - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/MappingExample/MappingExample.xcodeproj/project.pbxproj b/MappingExample/MappingExample.xcodeproj/project.pbxproj deleted file mode 100644 index 110e4a9..0000000 --- a/MappingExample/MappingExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,338 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 93BF78E8141D6EBA00EF7849 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93BF78E7141D6EBA00EF7849 /* UIKit.framework */; }; - 93BF78EA141D6EBA00EF7849 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93BF78E9141D6EBA00EF7849 /* Foundation.framework */; }; - 93BF78EC141D6EBA00EF7849 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93BF78EB141D6EBA00EF7849 /* CoreGraphics.framework */; }; - 93BF78F2141D6EBA00EF7849 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 93BF78F0141D6EBA00EF7849 /* InfoPlist.strings */; }; - 93BF78F4141D6EBA00EF7849 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BF78F3141D6EBA00EF7849 /* main.m */; }; - 93BF78F8141D6EBA00EF7849 /* MappingExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BF78F7141D6EBA00EF7849 /* MappingExampleAppDelegate.m */; }; - 93BF78FB141D6EBA00EF7849 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BF78F9141D6EBA00EF7849 /* MainWindow.xib */; }; - 93BF78FE141D6EBA00EF7849 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BF78FD141D6EBA00EF7849 /* RootViewController.m */; }; - 93BF7901141D6EBA00EF7849 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BF78FF141D6EBA00EF7849 /* RootViewController.xib */; }; - 93BF790A141D6EDC00EF7849 /* SOCKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BF7909141D6EDC00EF7849 /* SOCKit.m */; }; - 93BF790E141D6EE200EF7849 /* ABRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BF790D141D6EE200EF7849 /* ABRouter.m */; }; - 93BF7912141D6F2100EF7849 /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BF7910141D6F2100EF7849 /* MapViewController.m */; }; - 93BF7913141D6F2100EF7849 /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BF7911141D6F2100EF7849 /* MapViewController.xib */; }; - 93BF7918141D72D300EF7849 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93BF7917141D72D300EF7849 /* MapKit.framework */; }; - 93BF791A141D740600EF7849 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93BF7919141D740600EF7849 /* CoreLocation.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 93BF78E3141D6EBA00EF7849 /* MappingExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MappingExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 93BF78E7141D6EBA00EF7849 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 93BF78E9141D6EBA00EF7849 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 93BF78EB141D6EBA00EF7849 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 93BF78EF141D6EBA00EF7849 /* MappingExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MappingExample-Info.plist"; sourceTree = ""; }; - 93BF78F1141D6EBA00EF7849 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 93BF78F3141D6EBA00EF7849 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 93BF78F5141D6EBA00EF7849 /* MappingExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MappingExample-Prefix.pch"; sourceTree = ""; }; - 93BF78F6141D6EBA00EF7849 /* MappingExampleAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MappingExampleAppDelegate.h; sourceTree = ""; }; - 93BF78F7141D6EBA00EF7849 /* MappingExampleAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MappingExampleAppDelegate.m; sourceTree = ""; }; - 93BF78FA141D6EBA00EF7849 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - 93BF78FC141D6EBA00EF7849 /* RootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 93BF78FD141D6EBA00EF7849 /* RootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; - 93BF7900141D6EBA00EF7849 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/RootViewController.xib; sourceTree = ""; }; - 93BF7908141D6EDC00EF7849 /* SOCKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SOCKit.h; path = ../SOCKit/SOCKit.h; sourceTree = ""; }; - 93BF7909141D6EDC00EF7849 /* SOCKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SOCKit.m; path = ../SOCKit/SOCKit.m; sourceTree = ""; }; - 93BF790C141D6EE200EF7849 /* ABRouter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABRouter.h; sourceTree = ""; }; - 93BF790D141D6EE200EF7849 /* ABRouter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABRouter.m; sourceTree = ""; }; - 93BF790F141D6F2100EF7849 /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewController.h; sourceTree = ""; }; - 93BF7910141D6F2100EF7849 /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewController.m; sourceTree = ""; }; - 93BF7911141D6F2100EF7849 /* MapViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = ""; }; - 93BF7917141D72D300EF7849 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; - 93BF7919141D740600EF7849 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 93BF78E0141D6EBA00EF7849 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 93BF791A141D740600EF7849 /* CoreLocation.framework in Frameworks */, - 93BF7918141D72D300EF7849 /* MapKit.framework in Frameworks */, - 93BF78E8141D6EBA00EF7849 /* UIKit.framework in Frameworks */, - 93BF78EA141D6EBA00EF7849 /* Foundation.framework in Frameworks */, - 93BF78EC141D6EBA00EF7849 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 93BF78D8141D6EBA00EF7849 = { - isa = PBXGroup; - children = ( - 93BF790B141D6EE200EF7849 /* ABRouter */, - 93BF7907141D6ED000EF7849 /* SOCKit */, - 93BF78ED141D6EBA00EF7849 /* MappingExample */, - 93BF78E6141D6EBA00EF7849 /* Frameworks */, - 93BF78E4141D6EBA00EF7849 /* Products */, - ); - sourceTree = ""; - }; - 93BF78E4141D6EBA00EF7849 /* Products */ = { - isa = PBXGroup; - children = ( - 93BF78E3141D6EBA00EF7849 /* MappingExample.app */, - ); - name = Products; - sourceTree = ""; - }; - 93BF78E6141D6EBA00EF7849 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 93BF7919141D740600EF7849 /* CoreLocation.framework */, - 93BF7917141D72D300EF7849 /* MapKit.framework */, - 93BF78E7141D6EBA00EF7849 /* UIKit.framework */, - 93BF78E9141D6EBA00EF7849 /* Foundation.framework */, - 93BF78EB141D6EBA00EF7849 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 93BF78ED141D6EBA00EF7849 /* MappingExample */ = { - isa = PBXGroup; - children = ( - 93BF78F6141D6EBA00EF7849 /* MappingExampleAppDelegate.h */, - 93BF78F7141D6EBA00EF7849 /* MappingExampleAppDelegate.m */, - 93BF78F9141D6EBA00EF7849 /* MainWindow.xib */, - 93BF78FC141D6EBA00EF7849 /* RootViewController.h */, - 93BF78FD141D6EBA00EF7849 /* RootViewController.m */, - 93BF78FF141D6EBA00EF7849 /* RootViewController.xib */, - 93BF78EE141D6EBA00EF7849 /* Supporting Files */, - 93BF790F141D6F2100EF7849 /* MapViewController.h */, - 93BF7910141D6F2100EF7849 /* MapViewController.m */, - 93BF7911141D6F2100EF7849 /* MapViewController.xib */, - ); - path = MappingExample; - sourceTree = ""; - }; - 93BF78EE141D6EBA00EF7849 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 93BF78EF141D6EBA00EF7849 /* MappingExample-Info.plist */, - 93BF78F0141D6EBA00EF7849 /* InfoPlist.strings */, - 93BF78F3141D6EBA00EF7849 /* main.m */, - 93BF78F5141D6EBA00EF7849 /* MappingExample-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 93BF7907141D6ED000EF7849 /* SOCKit */ = { - isa = PBXGroup; - children = ( - 93BF7908141D6EDC00EF7849 /* SOCKit.h */, - 93BF7909141D6EDC00EF7849 /* SOCKit.m */, - ); - name = SOCKit; - sourceTree = ""; - }; - 93BF790B141D6EE200EF7849 /* ABRouter */ = { - isa = PBXGroup; - children = ( - 93BF790C141D6EE200EF7849 /* ABRouter.h */, - 93BF790D141D6EE200EF7849 /* ABRouter.m */, - ); - name = ABRouter; - path = ../ABRouter; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 93BF78E2141D6EBA00EF7849 /* MappingExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 93BF7904141D6EBA00EF7849 /* Build configuration list for PBXNativeTarget "MappingExample" */; - buildPhases = ( - 93BF78DF141D6EBA00EF7849 /* Sources */, - 93BF78E0141D6EBA00EF7849 /* Frameworks */, - 93BF78E1141D6EBA00EF7849 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MappingExample; - productName = MappingExample; - productReference = 93BF78E3141D6EBA00EF7849 /* MappingExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 93BF78DA141D6EBA00EF7849 /* Project object */ = { - isa = PBXProject; - attributes = { - ORGANIZATIONNAME = "Structlab LLC"; - }; - buildConfigurationList = 93BF78DD141D6EBA00EF7849 /* Build configuration list for PBXProject "MappingExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 93BF78D8141D6EBA00EF7849; - productRefGroup = 93BF78E4141D6EBA00EF7849 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 93BF78E2141D6EBA00EF7849 /* MappingExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 93BF78E1141D6EBA00EF7849 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 93BF78F2141D6EBA00EF7849 /* InfoPlist.strings in Resources */, - 93BF78FB141D6EBA00EF7849 /* MainWindow.xib in Resources */, - 93BF7901141D6EBA00EF7849 /* RootViewController.xib in Resources */, - 93BF7913141D6F2100EF7849 /* MapViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 93BF78DF141D6EBA00EF7849 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 93BF78F4141D6EBA00EF7849 /* main.m in Sources */, - 93BF78F8141D6EBA00EF7849 /* MappingExampleAppDelegate.m in Sources */, - 93BF78FE141D6EBA00EF7849 /* RootViewController.m in Sources */, - 93BF790A141D6EDC00EF7849 /* SOCKit.m in Sources */, - 93BF790E141D6EE200EF7849 /* ABRouter.m in Sources */, - 93BF7912141D6F2100EF7849 /* MapViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 93BF78F0141D6EBA00EF7849 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 93BF78F1141D6EBA00EF7849 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 93BF78F9141D6EBA00EF7849 /* MainWindow.xib */ = { - isa = PBXVariantGroup; - children = ( - 93BF78FA141D6EBA00EF7849 /* en */, - ); - name = MainWindow.xib; - sourceTree = ""; - }; - 93BF78FF141D6EBA00EF7849 /* RootViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - 93BF7900141D6EBA00EF7849 /* en */, - ); - name = RootViewController.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 93BF7902141D6EBA00EF7849 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 93BF7903141D6EBA00EF7849 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 93BF7905141D6EBA00EF7849 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MappingExample/MappingExample-Prefix.pch"; - INFOPLIST_FILE = "MappingExample/MappingExample-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 93BF7906141D6EBA00EF7849 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MappingExample/MappingExample-Prefix.pch"; - INFOPLIST_FILE = "MappingExample/MappingExample-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 93BF78DD141D6EBA00EF7849 /* Build configuration list for PBXProject "MappingExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 93BF7902141D6EBA00EF7849 /* Debug */, - 93BF7903141D6EBA00EF7849 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 93BF7904141D6EBA00EF7849 /* Build configuration list for PBXNativeTarget "MappingExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 93BF7905141D6EBA00EF7849 /* Debug */, - 93BF7906141D6EBA00EF7849 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 93BF78DA141D6EBA00EF7849 /* Project object */; -} diff --git a/MappingExample/MappingExample/MapViewController.h b/MappingExample/MappingExample/MapViewController.h deleted file mode 100644 index a9ecc67..0000000 --- a/MappingExample/MappingExample/MapViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MapViewController.h -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import -#import - -@interface MapViewController : UIViewController -@property(nonatomic,retain) IBOutlet MKMapView *mapView; -@property(nonatomic,retain) NSString *apiPath; -@property(nonatomic,retain) NSDictionary *parameters; -@end diff --git a/MappingExample/MappingExample/MapViewController.m b/MappingExample/MappingExample/MapViewController.m deleted file mode 100644 index 0cbe6d2..0000000 --- a/MappingExample/MappingExample/MapViewController.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// MapViewController.m -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "MapViewController.h" - -@implementation MapViewController -@synthesize apiPath, parameters, mapView; - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) - { - // Custom initialization - } - return self; -} - -- (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 - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.title = [self.parameters objectForKey:@"name"]; - - MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake([[self.parameters objectForKey:@"lat"] floatValue], [[self.parameters objectForKey:@"lng"] floatValue]) addressDictionary:[NSDictionary dictionary]]; - [self.mapView addAnnotation:placemark]; - [self.mapView setRegion:MKCoordinateRegionMake(placemark.coordinate, MKCoordinateSpanMake(0.2, 0.2)) animated:YES]; - [placemark release]; -} - -- (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 diff --git a/MappingExample/MappingExample/MapViewController.xib b/MappingExample/MappingExample/MapViewController.xib deleted file mode 100644 index 90eaa34..0000000 --- a/MappingExample/MappingExample/MapViewController.xib +++ /dev/null @@ -1,197 +0,0 @@ - - - - 1056 - 11B26 - 1617 - 1138 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 534 - - - YES - IBProxyObject - IBUIView - IBMKMapView - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {320, 460} - - - _NS:774 - YES - YES - IBCocoaTouchFramework - - - {{0, 20}, {320, 460}} - - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - mapView - - - - 5 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 4.IBPluginDependency - - - YES - MapViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 5 - - - - YES - - MapViewController - UIViewController - - mapView - MKMapView - - - mapView - - mapView - MKMapView - - - - IBProjectSource - ./Classes/MapViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 534 - - diff --git a/MappingExample/MappingExample/MappingExample-Info.plist b/MappingExample/MappingExample/MappingExample-Info.plist deleted file mode 100644 index 2f07f4b..0000000 --- a/MappingExample/MappingExample/MappingExample-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.structlab.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/MappingExample/MappingExample/MappingExample-Prefix.pch b/MappingExample/MappingExample/MappingExample-Prefix.pch deleted file mode 100644 index 8048298..0000000 --- a/MappingExample/MappingExample/MappingExample-Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header for all source files of the 'MappingExample' target in the 'MappingExample' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif - -#import "ABRouter.h" \ No newline at end of file diff --git a/MappingExample/MappingExample/MappingExampleAppDelegate.h b/MappingExample/MappingExample/MappingExampleAppDelegate.h deleted file mode 100644 index ef1ca58..0000000 --- a/MappingExample/MappingExample/MappingExampleAppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// MappingExampleAppDelegate.h -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface MappingExampleAppDelegate : NSObject - -@property (nonatomic, retain) IBOutlet UIWindow *window; - -@property (nonatomic, retain) IBOutlet UINavigationController *navigationController; - -@end diff --git a/MappingExample/MappingExample/MappingExampleAppDelegate.m b/MappingExample/MappingExample/MappingExampleAppDelegate.m deleted file mode 100644 index 6fc4901..0000000 --- a/MappingExample/MappingExample/MappingExampleAppDelegate.m +++ /dev/null @@ -1,71 +0,0 @@ -// -// MappingExampleAppDelegate.m -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "MappingExampleAppDelegate.h" -#import "MapViewController.h" - -@implementation MappingExampleAppDelegate - -@synthesize window = _window; -@synthesize navigationController = _navigationController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - [[ABRouter sharedRouter] match:@"/map?lat=:lat&lng=:lng&name=:name" to:[MapViewController class]]; - self.window.rootViewController = self.navigationController; - [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, this method is called instead of applicationWillTerminate: when the user quits. - */ -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - /* - Called as part of the 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. - Save data if appropriate. - See also applicationDidEnterBackground:. - */ -} - -- (void)dealloc -{ - [_window release]; - [_navigationController release]; - [super dealloc]; -} - -@end diff --git a/MappingExample/MappingExample/RootViewController.h b/MappingExample/MappingExample/RootViewController.h deleted file mode 100644 index f7ee586..0000000 --- a/MappingExample/MappingExample/RootViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// RootViewController.h -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -@interface RootViewController : UITableViewController -{ - NSMutableArray *tableItems; -} -@end diff --git a/MappingExample/MappingExample/RootViewController.m b/MappingExample/MappingExample/RootViewController.m deleted file mode 100644 index 52a87f0..0000000 --- a/MappingExample/MappingExample/RootViewController.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// RootViewController.m -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import "RootViewController.h" - -@implementation RootViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.title = @"Mapping Example"; - - tableItems = [[NSMutableArray alloc] init]; - [tableItems addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"/map?lat=37.331676&lng=-122.030243&name=Apple", @"path", @"Apple", @"name", nil]]; - [tableItems addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"/map?lat=37.423097&lng=-122.082642&name=Google", @"path", @"Google", @"name", nil]]; - [tableItems addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"/map?lat=47.673132&lng=-122.118487&name=Microsoft", @"path", @"Microsoft", @"name", nil]]; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [tableItems count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - } - - cell.textLabel.text = [[tableItems objectAtIndex:indexPath.row] objectForKey:@"name"]; - - return cell; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [[ABRouter sharedRouter] navigateTo:[[tableItems objectAtIndex:indexPath.row] objectForKey:@"path"] withNavigationController:self.navigationController]; -} - -@end diff --git a/MappingExample/MappingExample/en.lproj/InfoPlist.strings b/MappingExample/MappingExample/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/MappingExample/MappingExample/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/MappingExample/MappingExample/en.lproj/MainWindow.xib b/MappingExample/MappingExample/en.lproj/MainWindow.xib deleted file mode 100644 index 2d605fb..0000000 --- a/MappingExample/MappingExample/en.lproj/MainWindow.xib +++ /dev/null @@ -1,542 +0,0 @@ - - - - 1024 - 10D571 - 786 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 112 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - - 1316 - - {320, 480} - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - 1 - - IBCocoaTouchFramework - NO - - - 256 - {0, 0} - NO - YES - YES - IBCocoaTouchFramework - - - YES - - - - IBCocoaTouchFramework - - - RootViewController - - - 1 - - IBCocoaTouchFramework - NO - - - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - navigationController - - - - 15 - - - - - YES - - 0 - - - - - - 2 - - - YES - - - - - -1 - - - File's Owner - - - 3 - - - - - -2 - - - - - 9 - - - YES - - - - - - - 11 - - - - - 13 - - - YES - - - - - - 14 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 11.IBPluginDependency - 13.CustomClassName - 13.IBPluginDependency - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 9.IBEditorWindowLastContentRect - 9.IBPluginDependency - - - YES - UIApplication - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - RootViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - - YES - - - {{673, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - MappingExampleAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{186, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 16 - - - - YES - - RootViewController - UITableViewController - - IBProjectSource - RootViewController.h - - - - UIWindow - UIView - - IBUserSource - - - - - MappingExampleAppDelegate - NSObject - - YES - - YES - navigationController - window - - - YES - UINavigationController - UIWindow - - - - YES - - YES - navigationController - window - - - YES - - navigationController - UINavigationController - - - window - UIWindow - - - - - IBProjectSource - MappingExampleAppDelegate.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIApplication - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIApplication.h - - - - UIBarButtonItem - UIBarItem - - IBFrameworkSource - UIKit.framework/Headers/UIBarButtonItem.h - - - - UIBarItem - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIBarItem.h - - - - UINavigationBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UINavigationBar.h - - - - UINavigationController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UINavigationItem - NSObject - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWindow - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWindow.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - MappingExample.xcodeproj - 3 - 112 - - diff --git a/MappingExample/MappingExample/en.lproj/RootViewController.xib b/MappingExample/MappingExample/en.lproj/RootViewController.xib deleted file mode 100644 index e80ae71..0000000 --- a/MappingExample/MappingExample/en.lproj/RootViewController.xib +++ /dev/null @@ -1,384 +0,0 @@ - - - - 784 - 10D541 - 760 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 81 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 247} - - - 3 - MQA - - NO - YES - NO - IBCocoaTouchFramework - NO - 1 - 0 - YES - 44 - 22 - 22 - - - - - YES - - - view - - - - 3 - - - - dataSource - - - - 4 - - - - delegate - - - - 5 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - - - YES - RootViewController - UIResponder - {{144, 609}, {320, 247}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 5 - - - - YES - - RootViewController - UITableViewController - - IBProjectSource - RootViewController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - MappingExample.xcodeproj - 3 - 81 - - diff --git a/MappingExample/MappingExample/main.m b/MappingExample/MappingExample/main.m deleted file mode 100644 index 9d15a1a..0000000 --- a/MappingExample/MappingExample/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// MappingExample -// -// Created by Aaron Brethorst on 9/11/11. -// Copyright 2011 Structlab LLC. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/README.markdown b/README.markdown deleted file mode 100644 index f096e3e..0000000 --- a/README.markdown +++ /dev/null @@ -1,82 +0,0 @@ -About -===== - -Jeff Verkoeyen has alluded to the creation of a Three20'esque URL<->View Controller router for Nimbus as part of his SOCKit project...but I had a very real need for such a thing earlier today. So, I made one. A rather braindead URL->View Controller mapper, but it serves my purposes well enough. - -There is a very simple example project included. The intention of this router is that it will be extremely easy to plug into a subclass of AFNetworking's AFRestClient. And, assuming that your REST API subscribes to some notions of HATEOAS, it should be *incredibly* easy to connect to your backend. - -Why -===== - -I don't know about you, but I'm really tired of explicitly importing and pushing view controllers. It feels incredibly brittle. So, why not outsource the responsibility? Tell one object about all of your view controllers and make it figure things out. - -Some Specifics -==== - -Every view controller that wants to participate in the routing system must implement the `Routable` protocol. And they should be initializable solely through their `-init` method. That's it. You can't route the root yet. - -In your App Delegate ------ - -Match URL patterns to view controllers: - - [[ABRouter sharedRouter] match:@"/api/path" to:[MyViewController class]]; - -In your parent view controllers ------ - -Create, populate, and push view controllers: - - [[ABRouter sharedRouter] navigateTo:[dict objectForKey:@"url"] withNavigationController:self.navigationController]; - -or - - [[ABRouter sharedRouter] display:obj withNavigationController:self.navigationController]; - --display:withNavigationController: is a little janky at present, as it expects your object to have a -path method, but I haven't added a protocol for objects to enforce this. Soon, I promise. - -In your subordinate view controllers ------ - -Implement the `Routable` protocol, including the `apiPath` NSString property and optionally the `parameters` NSDictionary. - -Examples -==== - -Example ------ - -A super-simple example that shows how this works without involving anything ugly, like pulling data over the wire. :) - -GowallaExample ------ - -Shows you a list of the closest Gowalla 'spots' to where I was at the time of writing this example. Tap a spot to show more information about it. This example pulls in AFNetworking, and attempts to demonstrate the value of this sort of URL/view controller routing system. - -MappingExample ------ - -Demonstrates how to pass a dictionary of keys and values from the URL to the target view controller. - -MIT License -===== - - Copyright (c) 2011 Aaron Brethorst - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. \ No newline at end of file From 8596ed46319939da616fc7b401ce1e1e9ff6a532 Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 6 Jun 2013 14:30:37 +0200 Subject: [PATCH 6/6] Re-write opening url system --- ABRouter.h | 48 ++++++++++++++ ABRouter.m | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 ABRouter.h create mode 100644 ABRouter.m diff --git a/ABRouter.h b/ABRouter.h new file mode 100644 index 0000000..ad8269c --- /dev/null +++ b/ABRouter.h @@ -0,0 +1,48 @@ +// Copyright (c) 2011 Aaron Brethorst + +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#import + +@protocol Routable +@property(nonatomic,retain) NSString *apiPath; + +@optional +@property(nonatomic,retain) NSDictionary *parameters; +@property(nonatomic,retain) id entity; + +@end + +@interface ABRouter : NSObject +{ + NSMutableArray *routePatterns; +} + +@property (nonatomic, retain) UINavigationController *navigationController; + ++ (ABRouter*)sharedRouter; +- (void)setNavigationController:(UINavigationController *)controller; +- (void)match:(NSString*)pattern to:(Class)aClass; +- (void)match:(NSString*)pattern to:(Class)aClass modallyPresented:(UIModalTransitionStyle)transition; +- (UIViewController *)previousController; + +- (void)openURL:(NSString *)route; +- (void)openURL:(NSString *)route withParameters:(NSDictionary *)parameters; + +@end \ No newline at end of file diff --git a/ABRouter.m b/ABRouter.m new file mode 100644 index 0000000..195951d --- /dev/null +++ b/ABRouter.m @@ -0,0 +1,190 @@ +// Copyright (c) 2011 Aaron Brethorst + +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#import "ABRouter.h" +#import "SOCKit.h" +#define kPatternKey @"PatternKey" +#define kViewControllerKey @"ViewControllerKey" +#define kModalTransitionStyle @"ModalTransitionStyle" + +@interface ABRouter () + +- (NSDictionary *)match:(NSString*)route; + +@end + +static ABRouter *_sharedRouter = nil; + +@implementation ABRouter + ++ (ABRouter*)sharedRouter +{ + @synchronized(self) + { + if (!_sharedRouter) + { + _sharedRouter = [[ABRouter alloc] init]; + } + } + + return _sharedRouter; +} + +- (id)init +{ + self = [super init]; + if (self) + { + routePatterns = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc +{ + [routePatterns release]; + [super dealloc]; +} + +#pragma mark - Public Methods + +- (void)match:(NSString*)pattern to:(Class)aClass +{ + if (![aClass conformsToProtocol:@protocol(Routable)]) + { + [NSException raise:@"View Controller must conform to Routable protocol." format:@"%@", NSStringFromClass(aClass), nil]; + } + + [routePatterns addObject:[NSDictionary dictionaryWithObjectsAndKeys:[SOCPattern patternWithString:pattern], kPatternKey, aClass, kViewControllerKey, nil]]; +} + +- (void)match:(NSString*)pattern to:(Class)aClass modallyPresented:(UIModalTransitionStyle)transition +{ + if (![aClass conformsToProtocol:@protocol(Routable)]) + { + [NSException raise:@"View Controller must conform to Routable protocol." format:@"%@", NSStringFromClass(aClass), nil]; + } + + [routePatterns addObject:[NSDictionary dictionaryWithObjectsAndKeys:[SOCPattern patternWithString:pattern], kPatternKey, aClass, kViewControllerKey, [NSNumber numberWithInt:transition], kModalTransitionStyle, nil]]; +} + +- (void)openURL:(NSString *)route +{ + [self openURL:route withParameters:nil]; +} + +- (void)openURL:(NSString *)route withParameters:(NSDictionary *)parameters +{ + NSDictionary *match = [self match:route]; + UIViewController * pushMe = [match objectForKey:kViewControllerKey]; + pushMe.apiPath = route; + + if([match objectForKey:kModalTransitionStyle]) [self presentModalController:pushMe withTransitionStyle:[[match objectForKey:kModalTransitionStyle] integerValue] andParameters:parameters]; + else [self pushViewController:pushMe withParameters:parameters]; +} + +- (void)presentModalController:(UIViewController *)controller withTransitionStyle:(UIModalTransitionStyle)transition andParameters:(NSDictionary *)parameters +{ + if ([controller respondsToSelector:@selector(setParameters:)] && parameters) [controller performSelector:@selector(setParameters:) withObject:parameters]; + controller.modalTransitionStyle = transition; + [self.navigationController presentModalViewController:controller animated:YES]; +} + +- (void)pushViewController:(UIViewController *)controller withParameters:(NSDictionary *)parameters +{ + NSLog(@"push"); + if ([controller respondsToSelector:@selector(setParameters:)] && parameters) + { + [controller performSelector:@selector(setParameters:) withObject:parameters]; + } + [self.navigationController pushViewController:controller animated:YES]; +} + +- (NSDictionary *)match:(NSString*)route +{ + NSArray *pathInfo = [route componentsSeparatedByString:@"?"]; + route = [pathInfo objectAtIndex:0]; + + NSMutableArray *potentialMatches = [NSMutableArray array]; + for (NSDictionary *d in routePatterns) + { + if ([[d objectForKey:kPatternKey] stringMatches:route]) + { + [potentialMatches addObject:d]; + } + } + + if (0 == [potentialMatches count]) + { + // TODO: figure out a better punting strategy. + // Facebook opens up a UIWebView, which is sort + // of lame but seems like the least terrible of + // all solutions. + + return nil; + } + + NSDictionary *match = [potentialMatches lastObject]; + + SOCPattern *pattern = [match objectForKey:kPatternKey]; + Class class = [match objectForKey:kViewControllerKey]; + + NSLog(@"%@",class); + + UIViewController * pushMe = [[[class alloc] init] autorelease]; + pushMe.apiPath = route; + + if ([pushMe respondsToSelector:@selector(setParameters:)]) + { + + NSMutableDictionary *params = [NSMutableDictionary dictionary]; + + if (pathInfo.count > 1) + { + NSString *paramsString = [pathInfo objectAtIndex:1]; + NSArray *paramStringArr = [paramsString componentsSeparatedByString:@"&"]; + for (NSString *paramString in paramStringArr) + { + NSArray *paramArr = [paramString componentsSeparatedByString:@"="]; + if (paramArr.count > 1) + { + NSString *key = [paramArr objectAtIndex:0]; + NSString *value = [paramArr objectAtIndex:1]; + [params setObject:value forKey:key]; + } + } + } + [params addEntriesFromDictionary:[pattern parameterDictionaryFromSourceString:route]]; + + [pushMe performSelector:@selector(setParameters:) withObject:params]; + } + + NSMutableDictionary *tempDic =[NSMutableDictionary dictionaryWithObjectsAndKeys:pushMe, kViewControllerKey, nil]; + if([match objectForKey:kModalTransitionStyle]) [tempDic setObject:[match objectForKey:kModalTransitionStyle] forKey:kModalTransitionStyle]; + return tempDic; +} + + +- (UIViewController *)previousController +{ + return [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count-2]; +} + +@end