Skip to content

Commit

Permalink
Release 3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wes Smith committed Oct 29, 2015
1 parent 60cc91d commit 7988bea
Show file tree
Hide file tree
Showing 69 changed files with 222 additions and 88 deletions.
Binary file modified Button.bundle/BTNAlertView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAlertView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAlertView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAlertView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAppCard~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAppCard~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAppCard~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAppCard~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNBaseModalController.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~ipad.nib/objects.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~iphone.nib/objects.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~ipad.nib/objects.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~iphone.nib/objects.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~ipad.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/Button-Info.plist
Binary file not shown.
Binary file modified Button.bundle/ic_compass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_compass@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_compass@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_disclosure@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_disclosure@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_dismiss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_dismiss@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/ic_dismiss@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/tx_ride.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/tx_ride@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.bundle/tx_ride@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Button.framework/Versions/A/Button
Binary file not shown.
76 changes: 6 additions & 70 deletions Button.framework/Versions/A/Headers/BTNDropinButton.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#import "BTNView.h"

typedef NS_ENUM(NSUInteger, BTNDropinContentAlignment) {
BTNDropinContentAlignmentDefault,
BTNDropinContentAlignmentCenter
};
#import "BTNDropinButtonAppearanceProtocol.h"


@class BTNVenue;

@interface BTNDropinButton : UIControl
@interface BTNDropinButton : UIControl <BTNDropinButtonAppearance>

/// The identifier for this button instance (e.g. venue_page).
@property (nonatomic, copy) IBInspectable NSString *buttonId;
Expand Down Expand Up @@ -52,73 +48,13 @@ typedef NS_ENUM(NSUInteger, BTNDropinContentAlignment) {
- (instancetype)initWithButtonId:(NSString *)buttonId;



///-----------------
/// @name Appearance
///-----------------


/// Defines the insets of the dropin button's content view.
@property (nonatomic, assign) UIEdgeInsets contentInsets UI_APPEARANCE_SELECTOR;


/// Defines the alignment of the button's content. This supercedes any left/right content inset.
@property (nonatomic, assign) BTNDropinContentAlignment contentAlignment UI_APPEARANCE_SELECTOR;


/// Defines the corner radius of the dropin button (default is 0).
@property (nonatomic, assign) CGFloat cornerRadius UI_APPEARANCE_SELECTOR;


/// Defines the border width of the dropin button border (default is 0).
@property (nonatomic, assign) CGFloat borderWidth UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button border.
@property (nonatomic, strong) UIColor *borderColor UI_APPEARANCE_SELECTOR;


/// Defines the size of the icon view in the dropin button (applied to height and width).
@property (nonatomic, assign) CGFloat iconSize UI_APPEARANCE_SELECTOR;


/// Defines the spacing between the icon view and the text label in the dropin button.
@property (nonatomic, assign) CGFloat iconLabelSpacing UI_APPEARANCE_SELECTOR;


/// Defines the font used in the dropin button.
@property (nonatomic, strong) UIFont *font UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button icon, text, and border (when present).
@property (nonatomic, strong) UIColor *tintColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted color of the dropin button icon, text, and border (when present).
@property (nonatomic, strong) UIColor *highlightedTintColor UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button text (supersedes tintColor).
@property (nonatomic, strong) UIColor *textColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted color of the dropin button text (supersedes highlightedTintColor).
@property (nonatomic, strong) UIColor *highlightedTextColor UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button icon (supersedes tintColor).
@property (nonatomic, strong) UIColor *iconColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted color of the dropin button icon (supersedes highlightedTintColor).
@property (nonatomic, strong) UIColor *highlightedIconColor UI_APPEARANCE_SELECTOR;


/// Defines the normal background color for the button.
@property (nonatomic, strong) UIColor *normalBackgroundColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted background color for the button.
@property (nonatomic, strong) UIColor *highlightedBackgroundColor UI_APPEARANCE_SELECTOR;
/**
BTNDropinButton conforms to BTNDropinButtonAppearance.
For appearance properties @see BTNDropinButtonAppearance
*/

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
@import Foundation;
#import "BTNDropinButtonConstants.h"

@protocol BTNDropinButtonAppearance <NSObject>

@optional

///-----------------
/// @name Appearance
///-----------------


/// Defines the insets of the dropin button's content view.
@property (nonatomic, assign) UIEdgeInsets contentInsets UI_APPEARANCE_SELECTOR;


/// Defines the alignment of the button's content. This supercedes any left/right content inset.
@property (nonatomic, assign) BTNDropinContentAlignment contentAlignment UI_APPEARANCE_SELECTOR;


/// Defines the corner radius of the dropin button (default is 0).
@property (nonatomic, assign) CGFloat cornerRadius UI_APPEARANCE_SELECTOR;


/// Defines the border width of the dropin button border (default is 0).
@property (nonatomic, assign) CGFloat borderWidth UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button border.
@property (nonatomic, strong) UIColor *borderColor UI_APPEARANCE_SELECTOR;


/// Defines the size of the icon view in the dropin button (applied to height and width).
@property (nonatomic, assign) CGFloat iconSize UI_APPEARANCE_SELECTOR;


/// Defines the spacing between the icon view and the text label in the dropin button.
@property (nonatomic, assign) CGFloat iconLabelSpacing UI_APPEARANCE_SELECTOR;


/// Defines the font used in the dropin button.
@property (nonatomic, strong) UIFont *font UI_APPEARANCE_SELECTOR;


/// Defines the string case of the dropin button text.
@property (nonatomic, assign) BTNDropinButtonTextCase textCase UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin text.
@property (nonatomic, strong) UIColor *tintColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted tint color of the dropin button, text.
@property (nonatomic, strong) UIColor *highlightedTintColor UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button text (supersedes tintColor).
@property (nonatomic, strong) UIColor *textColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted color of the dropin button text (supersedes highlightedTintColor).
@property (nonatomic, strong) UIColor *highlightedTextColor UI_APPEARANCE_SELECTOR;


/// Defines the color of the dropin button icon (supersedes tintColor).
@property (nonatomic, strong) UIColor *iconColor UI_APPEARANCE_SELECTOR;


// Defines the highlighted color of the dropin button icon (supersedes highlightedTintColor).
@property (nonatomic, strong) UIColor *highlightedIconColor UI_APPEARANCE_SELECTOR;


/// Defines the normal background color for the button.
@property (nonatomic, strong) UIColor *normalBackgroundColor UI_APPEARANCE_SELECTOR;


/// Defines the highlighted background color for the button.
@property (nonatomic, strong) UIColor *highlightedBackgroundColor UI_APPEARANCE_SELECTOR;

@end
14 changes: 13 additions & 1 deletion Button.framework/Versions/A/Headers/BTNDropinButtonCell.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@import UIKit;
#import "BTNDropinButtonAppearanceProtocol.h"


@class BTNDropinButton, BTNVenue;

@interface BTNDropinButtonCell : UITableViewCell
@interface BTNDropinButtonCell : UITableViewCell <BTNDropinButtonAppearance>

/// The ID of the button this cell represents.
@property (nonatomic, copy) IBInspectable NSString *buttonId;
Expand Down Expand Up @@ -39,4 +41,14 @@
- (void)prepareForDisplayWithVenue:(BTNVenue *)venue
completion:(void(^)(BOOL isDisplayable))completionHandler;


///-----------------
/// @name Appearance
///-----------------

/**
BTNDropinButtonCell conforms to BTNDropinButtonAppearance.
For appearance properties @see BTNDropinButtonAppearance
*/

@end
20 changes: 20 additions & 0 deletions Button.framework/Versions/A/Headers/BTNDropinButtonConstants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
Dropin Button Constants
*/

typedef NS_ENUM(NSUInteger, BTNDropinContentAlignment) {
/// Default alignment for the button content.
BTNDropinContentAlignmentDefault,
/// Center alignemtn for the button content.
BTNDropinContentAlignmentCenter
};


typedef NS_ENUM(NSUInteger, BTNDropinButtonTextCase) {
/// The default text case (e.g. Request a ride)
BTNDropinButtonTextCaseDefault,
/// A lowercase representation (e.g. request a ride)
BTNDropinButtonTextCaseLower,
/// An uppercase representation (e.g. REQUEST A RIDE)
BTNDropinButtonTextCaseUpper
};
6 changes: 6 additions & 0 deletions Button.framework/Versions/A/Headers/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ typedef void(^BTNConfigurationCompletionBlock)(NSError *error);
///------------------


/**
The Button referrer token `btn_ref` indicating the last referrer.
*/
- (NSString *)referrerToken;


/**
Associate your ID for the current user with the Button session
@param thirdPartyId your identifier for the user
Expand Down
2 changes: 1 addition & 1 deletion Button.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Button"
s.version = "3.7.0"
s.version = "3.8.0"
s.summary = "Button iOS SDK."

s.description = <<-DESC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
DEC2AAD01ADC278900ED8393 /* Frameworks */,
DEC2AAD11ADC278900ED8393 /* Resources */,
F4F1338985BD947785DFC924 /* Copy Pods Resources */,
6DC8C8B5C719AD51B2AA2574 /* Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -211,6 +212,21 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
6DC8C8B5C719AD51B2AA2574 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CocoaPodsExample/Pods-CocoaPodsExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
D2CD21957B14BB55AE811528 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
6 changes: 3 additions & 3 deletions Examples/Objective-C/Button-CocoaPods/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Button (3.7.0)
- Button (3.8.0)

DEPENDENCIES:
- Button (from `../../../`)
Expand All @@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
Button: 6e9033b51b64edad61bff57d481ca4eb063fd622
Button: d5edd931e4e9713e623402b47bb41454712bdc6c

COCOAPODS: 0.37.2
COCOAPODS: 0.39.0
5 changes: 3 additions & 2 deletions Examples/Objective-C/Example-Source/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

/// This is not required if you manage your own permission requesting.
[BTNLocationManager allowButtonToRequestLocationPermission:YES];

[[Button sharedButton] configureWithApplicationId:@"app-0000000000000000" completion:^(NSError *error) {
#error Replace YOUR_BUTTON_APP_ID with your App ID from the Button Dashboard https://app.usebutton.com
[[Button sharedButton] configureWithApplicationId:@"YOUR_BUTTON_APP_ID" completion:^(NSError *error) {
if (error) {
NSLog(@"Error: %@", error.localizedDescription);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ - (void)viewDidLoad {
BTNContextReminderIdentifierKey: venue.venueId,
BTNContextReminderUseDebugIntervalKey: @YES };

#error Replace YOUR_BUTTON_ID with your Button ID from the Button Dashboard https://app.usebutton.com
self.dropinButton.buttonId = @"YOUR_BUTTON_ID";

[self.dropinButton prepareForDisplayWithContext:context completion:^(BOOL isDisplayable) {
NSLog(@"Displayable: %@", @(isDisplayable));
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ - (void)viewDidLoad {
latitude:40.723027
longitude:-73.9956459];


#error Replace YOUR_BUTTON_ID with your Button ID from the Button Dashboard https://app.usebutton.com
self.dropinButton.buttonId = @"YOUR_BUTTON_ID";

[self.dropinButton prepareForDisplayWithContext:@{ BTNContextEndLocationKey: venue.location } completion:^(BOOL isDisplayable) {
NSLog(@"Displayable: %@", @(isDisplayable));
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

if ([cell isKindOfClass:[BTNDropinButtonCell class]]) {
BTNDropinButtonCell *buttonCell = (BTNDropinButtonCell *)cell;

#error Replace YOUR_BUTTON_ID with your Button ID from the Button Dashboard https://app.usebutton.com
buttonCell.buttonId = @"YOUR_BUTTON_ID";

[buttonCell prepareForDisplayWithVenue:self.venue completion:^(BOOL isDisplayable) {
NSLog(@"Displayable: %@", @(isDisplayable));
// You might remove the backing data item and reload your table view if the button cell is not displayable.
Expand Down
6 changes: 3 additions & 3 deletions Examples/Swift/Button-CocoaPods/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Button (3.7.0)
- Button (3.8.0)

DEPENDENCIES:
- Button (from `../../../`)
Expand All @@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
Button: 6e9033b51b64edad61bff57d481ca4eb063fd622
Button: d5edd931e4e9713e623402b47bb41454712bdc6c

COCOAPODS: 0.37.2
COCOAPODS: 0.39.0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
6F8D1C6FFBE038FD1E5781BB /* Pods_SwiftPodsExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6334C567B523A7252AC2B7E8 /* Pods_SwiftPodsExample.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
6F8D1C6FFBE038FD1E5781BB /* Pods_SwiftPodsExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6334C567B523A7252AC2B7E8 /* Pods_SwiftPodsExample.framework */; };
DEDD25FF1BAA8D7500D957A1 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DEDD25FE1BAA8D7500D957A1 /* Info.plist */; settings = {ASSET_TAGS = (); }; };
DEDD26011BAA8DA900D957A1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED082121BAA82840093F867 /* AppDelegate.swift */; };
DEDD26021BAA8DB700D957A1 /* SimpleButtonExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEF1DC181BAA2B2B003252D2 /* SimpleButtonExampleViewController.swift */; settings = {ASSET_TAGS = (); }; };
Expand Down Expand Up @@ -138,6 +138,7 @@
DEF1DBF21BAA28F6003252D2 /* Resources */,
650A476D6432AC4004BFFCCC /* Copy Pods Resources */,
4B1B1FDA61A2F7B5A59BD053 /* Embed Pods Frameworks */,
DEFF92B11BDAD0D5000B9EE8 /* Button ID Check */,
);
buildRules = (
);
Expand Down Expand Up @@ -238,6 +239,20 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
DEFF92B11BDAD0D5000B9EE8 /* Button ID Check */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Button ID Check";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "TAGS=\"ERROR:\"\nfind \"${SRCROOT}/../Example-Source\" \\( -name \"*.swift\" \\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($TAGS).*\\$\" | perl -p -e \"s/($TAGS)/ error: \\$1/\"\n\nMATCHES=${PIPESTATUS[1]}\nif [ $MATCHES == 0 ]; then\n exit 1\nfi";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
Loading

0 comments on commit 7988bea

Please sign in to comment.