This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few bugs that are blocking beta release
* Fix a crasher with quick actions when you have fewer than four dynamic shortcuts to pick from. * Assert and return nil rather than crash when there's no API server registered to build a URL from. * Suppress the "Error Connecting" issue at app launch * Fix some wonky formatting * Rev bundle version
- Loading branch information
1 parent
03c42f8
commit 3a06e96
Showing
15 changed files
with
129 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSArray+OBAAdditions.h | ||
// org.onebusaway.iphone | ||
// | ||
// Created by Aaron Brethorst on 2/16/16. | ||
// Copyright © 2016 OneBusAway. All rights reserved. | ||
// | ||
|
||
#import <Foundation/NSArray.h> | ||
|
||
@interface NSArray (OBAAdditions) | ||
|
||
- (NSArray*)oba_pickFirst:(NSUInteger)count; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// NSArray+OBAAdditions.m | ||
// org.onebusaway.iphone | ||
// | ||
// Created by Aaron Brethorst on 2/16/16. | ||
// Copyright © 2016 OneBusAway. All rights reserved. | ||
// | ||
|
||
#import "NSArray+OBAAdditions.h" | ||
|
||
@implementation NSArray (OBAAdditions) | ||
|
||
- (NSArray*)oba_pickFirst:(NSUInteger)count | ||
{ | ||
if (self.count == 0) | ||
{ | ||
return self; | ||
} | ||
|
||
if (self.count < count) | ||
{ | ||
count = self.count; | ||
} | ||
|
||
return [self subarrayWithRange:NSMakeRange(0, count)]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// OBAMacros.h | ||
// OneBusAwaySDK | ||
// | ||
// Created by Aaron Brethorst on 2/16/16. | ||
// Copyright © 2016 One Bus Away. All rights reserved. | ||
// | ||
|
||
#ifndef OBAMacros_h | ||
#define OBAMacros_h | ||
|
||
#define APP_DELEGATE ((OBAApplicationDelegate*)[UIApplication sharedApplication].delegate) | ||
|
||
#define OBARGBCOLOR(__r, __g, __b) [UIColor colorWithRed:(__r / 255.f) green:(__g / 255.f) blue:(__b / 255.f) alpha:1.f] | ||
#define OBARGBACOLOR(__r, __g, __b, __a) [UIColor colorWithRed:(__r / 255.f) green:(__g / 255.f) blue:(__b / 255.f) alpha:__a] | ||
#define OBAGREENWITHALPHA(__a) [UIColor colorWithHue:(86.f/360.f) saturation:0.68f brightness:0.67f alpha:__a] | ||
#define OBAGREEN [UIColor colorWithHue:(86.f/360.f) saturation:0.68f brightness:0.67f alpha:1.f] | ||
#define OBAGREENBACKGROUND [UIColor colorWithRed:0.92f green:0.95f blue:0.88f alpha:.67f] | ||
#define OBADARKGREEN [UIColor colorWithRed:0.2f green:.4f blue:0.f alpha:1.f] | ||
|
||
#define OBAViewedArrivalsAndDeparturesForStopNotification @"OBAViewedArrivalsAndDeparturesForStopNotification" | ||
#define OBAMostRecentStopsChangedNotification @"OBAMostRecentStopsChangedNotification" | ||
|
||
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | ||
|
||
#define OBAGuard(CONDITION) \ | ||
if (!CONDITION) { NSParameterAssert(CONDITION); } \ | ||
if (CONDITION) {} | ||
|
||
#endif /* OBAMacros_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters