Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisballinger committed Aug 7, 2014
2 parents 501d6e5 + 212590a commit 7e6f5df
Show file tree
Hide file tree
Showing 13 changed files with 337 additions and 29 deletions.
3 changes: 2 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ pod 'FormatterKit/LocationFormatter', '~> 1.6'
pod 'FormatterKit/TimeIntervalFormatter', '~> 1.6'
pod 'HockeySDK', '~> 3.5'
pod 'PureLayout', '~> 1.0'
pod 'MCSwipeTableViewCell', '~> 2.1'
pod 'MCSwipeTableViewCell', '~> 2.1'
pod 'DAKeyboardControl', '~> 2.4'
3 changes: 3 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PODS:
- CocoaLumberjack/Core (1.6.5.1)
- CocoaLumberjack/Extensions (1.6.5.1):
- CocoaLumberjack/Core
- DAKeyboardControl (2.4.0)
- FMDB (2.3):
- FMDB/standard
- FMDB/common (2.3)
Expand Down Expand Up @@ -34,6 +35,7 @@ PODS:
- YapDatabase/common

DEPENDENCIES:
- DAKeyboardControl (~> 2.4)
- FormatterKit/LocationFormatter (~> 1.6)
- FormatterKit/TimeIntervalFormatter (~> 1.6)
- HockeySDK (~> 3.5)
Expand All @@ -50,6 +52,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
CocoaLumberjack: baf4a09a3bcbdfea3363556a90104e026d3504e2
DAKeyboardControl: 45a363c85c48a7df76f21f236d9f85800e001775
FMDB: 31ec26773c7f7b7890a6038235a1f2bbd933a7cb
FormatterKit: 534b21b52b9b822a9ec884a14e2debf92e7a3126
GRMustache: ab96109b7ba4b9568425bea40d6cd2cdc7582b6c
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Fortunately, you can still run and test the app with the previous year's data.
* Show data from previous years
* Optimizations
* Data Embargo :(
* Show Favorites on the Map
* Show Favorites on the Map
* Favorite items by long-pressing on cell
* Scroll back to top when switching sort
* Put Playa location as first item in detail view (e.g. 7:45 & E)
Expand Down
12 changes: 12 additions & 0 deletions iBurn.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
63228321198AB383009E472B /* RMMarker+iBurn.m in Sources */ = {isa = PBXBuildFile; fileRef = 63228320198AB383009E472B /* RMMarker+iBurn.m */; };
63228327198C1BF7009E472B /* BRCEventsFilterTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63228326198C1BF7009E472B /* BRCEventsFilterTableViewController.m */; };
6322832B198C2B48009E472B /* NSUserDefaults+iBurn.m in Sources */ = {isa = PBXBuildFile; fileRef = 6322832A198C2B48009E472B /* NSUserDefaults+iBurn.m */; };
632F77571993FC8100707FAF /* BRCEmbargoPasscodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 632F77561993FC8100707FAF /* BRCEmbargoPasscodeViewController.m */; };
639E638D1994178500B62A92 /* BRCEmbargo.m in Sources */ = {isa = PBXBuildFile; fileRef = 639E638C1994178500B62A92 /* BRCEmbargo.m */; };
63CE2A581987140F00F65B01 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CE2A571987140F00F65B01 /* Foundation.framework */; };
63CE2A5A1987140F00F65B01 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CE2A591987140F00F65B01 /* CoreGraphics.framework */; };
63CE2A5C1987140F00F65B01 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CE2A5B1987140F00F65B01 /* UIKit.framework */; };
Expand Down Expand Up @@ -80,6 +82,10 @@
63228326198C1BF7009E472B /* BRCEventsFilterTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRCEventsFilterTableViewController.m; sourceTree = "<group>"; };
63228329198C2B48009E472B /* NSUserDefaults+iBurn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSUserDefaults+iBurn.h"; sourceTree = "<group>"; };
6322832A198C2B48009E472B /* NSUserDefaults+iBurn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSUserDefaults+iBurn.m"; sourceTree = "<group>"; };
632F77551993FC8100707FAF /* BRCEmbargoPasscodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRCEmbargoPasscodeViewController.h; sourceTree = "<group>"; };
632F77561993FC8100707FAF /* BRCEmbargoPasscodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRCEmbargoPasscodeViewController.m; sourceTree = "<group>"; };
639E638B1994178500B62A92 /* BRCEmbargo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRCEmbargo.h; sourceTree = "<group>"; };
639E638C1994178500B62A92 /* BRCEmbargo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRCEmbargo.m; sourceTree = "<group>"; };
63CE2A541987140F00F65B01 /* iBurn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iBurn.app; sourceTree = BUILT_PRODUCTS_DIR; };
63CE2A571987140F00F65B01 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
63CE2A591987140F00F65B01 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -246,6 +252,8 @@
63CE2A671987140F00F65B01 /* BRCAppDelegate.m */,
63228329198C2B48009E472B /* NSUserDefaults+iBurn.h */,
6322832A198C2B48009E472B /* NSUserDefaults+iBurn.m */,
639E638B1994178500B62A92 /* BRCEmbargo.h */,
639E638C1994178500B62A92 /* BRCEmbargo.m */,
6322830C1989836F009E472B /* MapClasses */,
63D270F61987157900204954 /* ViewControllers */,
63CE2A691987140F00F65B01 /* Images.xcassets */,
Expand All @@ -272,6 +280,8 @@
6322830219881E27009E472B /* DetailViewControllers */,
D994155E19871D9000D245C7 /* Filtered Tables */,
D99395A5198B806800E9ADD2 /* MapViewControllers */,
632F77551993FC8100707FAF /* BRCEmbargoPasscodeViewController.h */,
632F77561993FC8100707FAF /* BRCEmbargoPasscodeViewController.m */,
);
name = ViewControllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -513,10 +523,12 @@
files = (
D994156119871E8400D245C7 /* BRCEventsTableViewController.m in Sources */,
D97D7A31198ADBE400CA7828 /* NSDateFormatter+iBurn.m in Sources */,
639E638D1994178500B62A92 /* BRCEmbargo.m in Sources */,
630861C9199029D100AD7109 /* BRCLocations.m in Sources */,
D92562C6198876C400ED6B50 /* BRCEventObjectTableViewCell.m in Sources */,
6322830B19882153009E472B /* BRCRelationshipDetailInfoCell.m in Sources */,
D99395A8198B897B00E9ADD2 /* BRCDetailInfoTableViewCell.m in Sources */,
632F77571993FC8100707FAF /* BRCEmbargoPasscodeViewController.m in Sources */,
6322830119881DDE009E472B /* BRCDetailViewController.m in Sources */,
D94EFA51199158D2009F12F4 /* CLLocationManager+iBurn.m in Sources */,
D9941568198726A700D245C7 /* BRCArtObject.m in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions iBurn/BRCAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@

@property (strong, nonatomic) UIWindow *window;

- (void)showTabBarAnimated:(BOOL)animated;

@end
76 changes: 53 additions & 23 deletions iBurn/BRCAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#import "BRCEventObject_Private.h"
#import "NSDateFormatter+iBurn.h"
#import "BRCSecrets.h"
#import "BRCEmbargoPasscodeViewController.h"
#import "BRCEmbargo.h"

static NSString * const kBRCHasImportedDataKey = @"kBRCHasImportedDataKey";

Expand Down Expand Up @@ -48,31 +50,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

BRCMapViewController *mapViewController = [[BRCMapViewController alloc] init];
UINavigationController *mapNavController = [[UINavigationController alloc] initWithRootViewController:mapViewController];
mapNavController.tabBarItem.image = [UIImage imageNamed:@"BRCMapIcon"];

BRCFilteredTableViewController *artTableVC = [[BRCFilteredTableViewController alloc] initWithViewClass:[BRCArtObject class]];
artTableVC.title = @"Art";
UINavigationController *artNavController = [[UINavigationController alloc] initWithRootViewController:artTableVC];
artNavController.tabBarItem.image = [UIImage imageNamed:@"BRCArtIcon"];

BRCFilteredTableViewController *campTableVC = [[BRCFilteredTableViewController alloc] initWithViewClass:[BRCCampObject class]];
campTableVC.title = @"Camps";
UINavigationController *campNavController = [[UINavigationController alloc] initWithRootViewController:campTableVC];
campNavController.tabBarItem.image = [UIImage imageNamed:@"BRCCampIcon"];

BRCEventsTableViewController *eventsTableVC = [[BRCEventsTableViewController alloc] initWithViewClass:[BRCEventObject class]];
eventsTableVC.title = @"Events";
UINavigationController *eventsNavController = [[UINavigationController alloc] initWithRootViewController:eventsTableVC];
eventsNavController.tabBarItem.image = [UIImage imageNamed:@"BRCEventIcon"];

UITabBarController *tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = @[mapNavController, artNavController, campNavController, eventsNavController];
if ([BRCEmbargo allowEmbargoedData]) {

self.window.rootViewController = [self defaultTabBarController];
}
else {
self.window.rootViewController = [self embargoViewController];
}

self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = tabBarController;

[self.window makeKeyAndVisible];
return YES;
}
Expand Down Expand Up @@ -104,6 +90,50 @@ - (void)applicationWillTerminate:(UIApplication *)application
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

- (void)showTabBarAnimated:(BOOL)animated{

[UIView transitionWithView:self.window
duration:0.5
options:UIViewAnimationOptionTransitionFlipFromLeft
animations:^{
self.window.rootViewController = [self defaultTabBarController];
}
completion:nil];

}

- (UIViewController *)defaultTabBarController
{
BRCMapViewController *mapViewController = [[BRCMapViewController alloc] init];
UINavigationController *mapNavController = [[UINavigationController alloc] initWithRootViewController:mapViewController];
mapNavController.tabBarItem.image = [UIImage imageNamed:@"BRCMapIcon"];

BRCFilteredTableViewController *artTableVC = [[BRCFilteredTableViewController alloc] initWithViewClass:[BRCArtObject class]];
artTableVC.title = @"Art";
UINavigationController *artNavController = [[UINavigationController alloc] initWithRootViewController:artTableVC];
artNavController.tabBarItem.image = [UIImage imageNamed:@"BRCArtIcon"];

BRCFilteredTableViewController *campTableVC = [[BRCFilteredTableViewController alloc] initWithViewClass:[BRCCampObject class]];
campTableVC.title = @"Camps";
UINavigationController *campNavController = [[UINavigationController alloc] initWithRootViewController:campTableVC];
campNavController.tabBarItem.image = [UIImage imageNamed:@"BRCCampIcon"];

BRCEventsTableViewController *eventsTableVC = [[BRCEventsTableViewController alloc] initWithViewClass:[BRCEventObject class]];
eventsTableVC.title = @"Events";
UINavigationController *eventsNavController = [[UINavigationController alloc] initWithRootViewController:eventsTableVC];
eventsNavController.tabBarItem.image = [UIImage imageNamed:@"BRCEventIcon"];

UITabBarController *tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = @[mapNavController, artNavController, campNavController, eventsNavController];

return tabBarController;
}

- (UIViewController *)embargoViewController
{
return [[BRCEmbargoPasscodeViewController alloc] init];
}

- (void) setupFestivalDates {
if ([[NSUserDefaults standardUserDefaults] objectForKey:kBRCStartDateKey]) {
return;
Expand Down
19 changes: 19 additions & 0 deletions iBurn/BRCEmbargo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// BRCEmbargo.h
// iBurn
//
// Created by David Chiles on 8/7/14.
// Copyright (c) 2014 Burning Man Earth. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BRCEmbargo : NSObject


+ (BOOL)isEmbargoPasscodeString:(NSString *)passcode;

/**Checks if the password has been entered or before gates open */
+ (BOOL)allowEmbargoedData;

@end
31 changes: 31 additions & 0 deletions iBurn/BRCEmbargo.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// BRCEmbargo.m
// iBurn
//
// Created by David Chiles on 8/7/14.
// Copyright (c) 2014 Burning Man Earth. All rights reserved.
//

#import "BRCEmbargo.h"
#import "NSUserDefaults+iBurn.h"
#import "BRCSecrets.h"
#import "BRCEventObject.h"

@implementation BRCEmbargo

+ (BOOL)isEmbargoPasscodeString:(NSString *)passcode
{
return [passcode isEqualToString:kBRCEmbargoPasscode];
}

+ (BOOL)allowEmbargoedData
{
//Data is not embargoed after start of festival or if the passcode has been entered
if ([[NSUserDefaults standardUserDefaults] enteredEmbargoPasscode] || [[BRCEventObject festivalStartDate] timeIntervalSinceNow] < 0) {
return YES;
}
return NO;
}


@end
13 changes: 13 additions & 0 deletions iBurn/BRCEmbargoPasscodeViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// BRCEmbargoPasscodeViewController.h
// iBurn
//
// Created by David Chiles on 8/7/14.
// Copyright (c) 2014 Burning Man Earth. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface BRCEmbargoPasscodeViewController : UIViewController

@end
Loading

0 comments on commit 7e6f5df

Please sign in to comment.