[frameworks] [ios] Updated 3rd party frameworks.

This commit is contained in:
Ilya Grechuhin 2018-01-12 17:44:18 +03:00 committed by Roman Kuznetsov
parent 801f11e684
commit 50430decdd
112 changed files with 769 additions and 699 deletions

View file

@ -1,8 +1,8 @@
github "Alamofire/Alamofire" "4.5.1"
github "Alamofire/Alamofire" "4.6.0"
github "Alamofire/AlamofireImage" "3.3.0"
github "AppsFlyerSDK/AppsFlyerFramework" "4.8.1"
github "BoltsFramework/Bolts-ObjC" "1.8.4"
github "Pushwoosh/pushwoosh-ios-sdk" "5.5.1"
github "AppsFlyerSDK/AppsFlyerFramework" "4.8.2"
github "BoltsFramework/Bolts-ObjC" "1.9.0"
github "Pushwoosh/pushwoosh-ios-sdk" "5.5.3"
github "facebook/Facebook-SDK-Swift" "0.3.0"
github "facebook/facebook-ios-sdk" "sdk-version-4.28.0"
github "facebook/facebook-ios-sdk" "sdk-version-4.29.0"
github "skywinder/ActionSheetPicker-3.0" "2.3.0"

View file

@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.0.2 effective-3.2.2 (swiftlang-900.0.69.2 clang-900.0.38)
// Generated by Apple Swift version 4.0.3 effective-3.2.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

View file

@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.0.2 effective-3.2.2 (swiftlang-900.0.69.2 clang-900.0.38)
// Generated by Apple Swift version 4.0.3 effective-3.2.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

View file

@ -6,5 +6,5 @@
#import <Foundation/Foundation.h>
#endif
#define kAppsFlyerSDKBuildNumber @"4.8.1"
#define kJenkinsBuildNumber @"602"
#define kAppsFlyerSDKBuildNumber @"4.8.2"
#define kJenkinsBuildNumber @"617"

View file

@ -2,7 +2,7 @@
// AppsFlyerTracker.h
// AppsFlyerLib
//
// AppsFlyer iOS SDK 4.8.1 (602)
// AppsFlyer iOS SDK 4.8.2 (617)
// Copyright (c) 2013 AppsFlyer Ltd. All rights reserved.
//
@ -36,7 +36,7 @@
#define AFEventOpenedFromPushNotification @"af_opened_from_push_notification"
#define AFEventLocation @"af_location_coordinates"
#define AFEventCustomerSegment @"af_customer_segment"
#define AFEventContent @"af_content"
// In app event parameter names
@ -150,13 +150,7 @@ typedef enum {
@end
@interface AppsFlyerTracker : NSObject {
BOOL _isDebug;
BOOL permitAggregateiAdData;
BOOL _useReceiptValidationSandbox;
BOOL _useUninstallSandbox;
EmailCryptType emailCryptType;
NSArray *userEmails;
}
+(AppsFlyerTracker*) sharedTracker;
@ -180,10 +174,6 @@ typedef enum {
*/
@property (nonatomic, strong) NSString *currencyCode;
/* AppsFlyer's SDK send the data to AppsFlyer's servers over HTTPS. You can set the isHTTPS property to NO in order to use regular HTTP. */
//@property BOOL isHTTPS;
/*
* AppsFLyer SDK collect Apple's advertisingIdentifier if the AdSupport framework included in the SDK.
* You can disable this behavior by setting the following property to YES.
@ -293,12 +283,12 @@ typedef enum {
/*
* In case you want to track deep linking, call this method from your delegate's openURL method.
*/
- (void) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication __attribute__((deprecated));
- (void) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication;
/*
* In case you want to track deep linking, call this method from your delegate's openURL method with refferer.
*/
- (void) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication withAnnotation:(id) annotation __attribute__((deprecated));
- (void) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication withAnnotation:(id) annotation;
- (void) handleOpenUrl:(NSURL *) url options:(NSDictionary *)options;
@ -325,11 +315,6 @@ typedef enum {
- (void) remoteDebuggingCallWithData:(NSString *) data;
//- (void) crossPromotionViewed:(NSString*) appID campaign:(NSString*) campaign;
//- (void) openAppStoreForAppID:(NSString*) appID campaign:(NSString*)
//campaign paramters:(NSDictionary*) parameters
// viewController: (UIViewController*) viewController;
/*!
* @brief This property accepts a string value representing the host name for all enpoints.
* @warning To use `default` SDK endpoint set value to `nil`.

Binary file not shown.

View file

@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
custom requests with additional navigation and app data attached to them by
creating BFAppLinkNavigations themselves.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkNavigation : NSObject
/*!

View file

@ -25,6 +25,6 @@
@param url The URL to resolve into an App Link.
@returns A BFTask that will return a BFAppLink for the given URL.
*/
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url;
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension");
@end

View file

@ -40,6 +40,7 @@
A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including
the ability to display the view above the navigation bar for navigation-based apps.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkReturnToRefererController : NSObject <BFAppLinkReturnToRefererViewDelegate>
/*!

View file

@ -48,6 +48,7 @@ typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) {
rather than navigating away. If the view is provided an App Link that does not contain
referer data, it will have zero size and no UI will be displayed.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkReturnToRefererView : UIView
/*!

View file

@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
/*!
A block that will be called when a token is cancelled.
*/
typedef void(^BFCancellationBlock)();
typedef void(^BFCancellationBlock)(void);
/*!
The consumer view of a CancellationToken.

View file

@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
Returns a new executor that uses the given block to execute continuations.
@param block The block to use.
*/
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;
+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block;
/*!
Returns a new executor that runs continuations on the given queue.
@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
Runs the given block using this executor's particular strategy.
@param block The block to execute.
*/
- (void)execute:(void(^)())block;
- (void)execute:(void(^)(void))block;
@end

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#import <Foundation/Foundation.h>
#pragma once
/**
This exists to use along with `BFTask` and `BFTaskCompletionSource`.
Instead of returning a `BFTask` with no generic type, or a generic type of 'NSNull'
when there is no usable result from a task, we use the type 'BFVoid', which will always have a value of `nil`.
This allows you to provide a more enforced API contract to the caller,
as sending any message to `BFVoid` will result in a compile time error.
*/
@class _BFVoid_Nonexistant;
typedef _BFVoid_Nonexistant *BFVoid;

View file

@ -1,32 +0,0 @@
/*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Returns whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
@return Boolean value indicating whether exceptions are being caught.
*/
extern BOOL BFTaskCatchesExceptions(void)
__attribute__((deprecated("This is temporary API and will be removed in a future release.")));
/**
Set whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
@param catchExceptions Boolean value indicating whether exceptions shoudl be caught.
*/
extern void BFTaskSetCatchesExceptions(BOOL catchExceptions)
__attribute__((deprecated("This is a temporary API and will be removed in a future release.")));
NS_ASSUME_NONNULL_END

View file

@ -11,6 +11,7 @@
#import <Foundation/Foundation.h>
#import <Bolts/BFCancellationToken.h>
#import <Bolts/BFGeneric.h>
NS_ASSUME_NONNULL_BEGIN
@ -24,29 +25,12 @@ extern NSString *const BFTaskErrorDomain;
*/
extern NSInteger const kBFMultipleErrorsError;
/*!
An exception that is thrown if there was multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
extern NSString *const BFTaskMultipleExceptionsException
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSError *> *`.
*/
extern NSString *const BFTaskMultipleErrorsUserInfoKey;
/*!
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSException *> *`.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
extern NSString *const BFTaskMultipleExceptionsUserInfoKey
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
@class BFExecutor;
@class BFTask;
@ -74,15 +58,6 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *t);
*/
+ (instancetype)taskWithError:(NSError *)error;
/*!
Creates a task that is already completed with the given exception.
@param exception The exception for the task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
+ (instancetype)taskWithException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Creates a task that is already cancelled.
*/
@ -105,7 +80,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
/*!
Returns a task that will be completed once there is at least one successful task.
The first task to successuly complete will set the result, all other tasks results are
The first task to successuly complete will set the result, all other tasks results are
ignored.
@param tasks An `NSArray` of the tasks to use as an input.
*/
@ -116,7 +91,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
@param millis The approximate number of milliseconds to wait before the
task will be finished (with result == nil).
*/
+ (instancetype)taskWithDelay:(int)millis;
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis;
/*!
Returns a task that will be completed a certain amount of time in the future.
@ -124,7 +99,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
task will be finished (with result == nil).
@param token The cancellation token (optional).
*/
+ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token;
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token;
/*!
Returns a task that will be completed after the given block completes with
@ -136,7 +111,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)())block;
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)(void))block;
// Properties that will be set on the task once it is completed.
@ -150,21 +125,13 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
*/
@property (nullable, nonatomic, strong, readonly) NSError *error;
/*!
The exception of a failed task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
@property (nullable, nonatomic, strong, readonly) NSException *exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Whether this task has been cancelled.
*/
@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
/*!
Whether this task has completed due to an error or exception.
Whether this task has completed due to an error.
*/
@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted;
@ -184,7 +151,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(block:));
/*!
Enqueues the given block to be run once this task is complete.
@ -198,7 +165,8 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken;
- (BFTask *)continueWithBlock:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken NS_SWIFT_NAME(continueWith(block:cancellationToken:));
/*!
Enqueues the given block to be run once this task is complete.
@ -209,7 +177,9 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
withBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(executor:block:));
/*!
Enqueues the given block to be run once this task is complete.
@param executor A BFExecutor responsible for determining how the
@ -222,11 +192,12 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
block:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken;
cancellationToken:(nullable BFCancellationToken *)cancellationToken
NS_SWIFT_NAME(continueWith(executor:block:cancellationToken:));
/*!
Identical to continueWithBlock:, except that the block is only run
if this task did not produce a cancellation, error, or exception.
if this task did not produce a cancellation or an error.
If it did, then the failure will be propagated to the returned
task.
@param block The block to be run once this task is complete.
@ -234,11 +205,11 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(block:));
/*!
Identical to continueWithBlock:, except that the block is only run
if this task did not produce a cancellation, error, or exception.
if this task did not produce a cancellation or an error.
If it did, then the failure will be propagated to the returned
task.
@param block The block to be run once this task is complete.
@ -247,13 +218,14 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken;
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken
NS_SWIFT_NAME(continueOnSuccessWith(block:cancellationToken:));
/*!
Identical to continueWithExecutor:withBlock:, except that the block
is only run if this task did not produce a cancellation, error, or
exception. If it did, then the failure will be propagated to the
returned task.
is only run if this task did not produce a cancellation, error, or an error.
If it did, then the failure will be propagated to the returned task.
@param executor A BFExecutor responsible for determining how the
continuation block will be run.
@param block The block to be run once this task is complete.
@ -261,13 +233,13 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withSuccessBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
withSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(executor:block:));
/*!
Identical to continueWithExecutor:withBlock:, except that the block
is only run if this task did not produce a cancellation, error, or
exception. If it did, then the failure will be propagated to the
returned task.
is only run if this task did not produce a cancellation or an error.
If it did, then the failure will be propagated to the returned task.
@param executor A BFExecutor responsible for determining how the
continuation block will be run.
@param block The block to be run once this task is complete.
@ -278,7 +250,8 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
successBlock:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken;
cancellationToken:(nullable BFCancellationToken *)cancellationToken
NS_SWIFT_NAME(continueOnSuccessWith(executor:block:cancellationToken:));
/*!
Waits until this operation is completed.

View file

@ -12,7 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
@class BFTask<ResultType>;
@class BFTask<__covariant ResultType>;
/*!
A BFTaskCompletionSource represents the producer side of tasks.
@ -36,24 +36,14 @@ NS_ASSUME_NONNULL_BEGIN
Attempting to set this for a completed task will raise an exception.
@param result The result of the task.
*/
- (void)setResult:(nullable ResultType)result;
- (void)setResult:(nullable ResultType)result NS_SWIFT_NAME(set(result:));
/*!
Completes the task by setting the error.
Attempting to set this for a completed task will raise an exception.
@param error The error for the task.
*/
- (void)setError:(NSError *)error;
/*!
Completes the task by setting an exception.
Attempting to set this for a completed task will raise an exception.
@param exception The exception for the task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
- (void)setException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
- (void)setError:(NSError *)error NS_SWIFT_NAME(set(error:));
/*!
Completes the task by marking it as cancelled.
@ -65,24 +55,14 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
Sets the result of the task if it wasn't already completed.
@returns whether the new value was set.
*/
- (BOOL)trySetResult:(nullable ResultType)result;
- (BOOL)trySetResult:(nullable ResultType)result NS_SWIFT_NAME(trySet(result:));
/*!
Sets the error of the task if it wasn't already completed.
@param error The error for the task.
@returns whether the new value was set.
*/
- (BOOL)trySetError:(NSError *)error;
/*!
Sets the exception of the task if it wasn't already completed.
@param exception The exception for the task.
@returns whether the new value was set.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
- (BOOL)trySetException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
- (BOOL)trySetError:(NSError *)error NS_SWIFT_NAME(trySet(error:));
/*!
Sets the cancellation state of the task if it wasn't already completed.

View file

@ -12,8 +12,8 @@
#import <Bolts/BFCancellationTokenRegistration.h>
#import <Bolts/BFCancellationTokenSource.h>
#import <Bolts/BFExecutor.h>
#import <Bolts/BFGeneric.h>
#import <Bolts/BFTask.h>
#import <Bolts/BFTask+Exceptions.h>
#import <Bolts/BFTaskCompletionSource.h>
#if __has_include(<Bolts/BFAppLink.h>) && TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV

Binary file not shown.

View file

@ -1,28 +1,28 @@
//
// Copyright (c) 2011, Tim Cinel
// All rights reserved.
//Copyright (c) 2011, Tim Cinel
//All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import <Foundation/Foundation.h>
@ -30,77 +30,70 @@
@class SWActionSheet;
#define SuppressPerformSelectorLeakWarning(Stuff) \
do \
{ \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") Stuff; \
_Pragma("clang diagnostic pop") \
} while (0)
#define SuppressPerformSelectorLeakWarning(Stuff) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
Stuff; \
_Pragma("clang diagnostic pop") \
} while (0)
typedef NS_ENUM(NSInteger, ActionType) { ActionTypeValue, ActionTypeSelector, ActionTypeBlock };
typedef NS_ENUM(NSInteger, ActionType) {
ActionTypeValue,
ActionTypeSelector,
ActionTypeBlock
};
typedef NS_ENUM(NSInteger, TapAction) { TapActionNone, TapActionSuccess, TapActionCancel };
typedef NS_ENUM(NSInteger, TapAction) {
TapActionNone,
TapActionSuccess,
TapActionCancel
};
typedef void (^ActionBlock)(void);
static NSString * const kButtonValue = @"buttonValue";
static NSString *const kButtonValue = @"buttonValue";
static NSString * const kButtonTitle = @"buttonTitle";
static NSString *const kButtonTitle = @"buttonTitle";
static NSString * const kActionType = @"buttonAction";
static NSString *const kActionType = @"buttonAction";
static NSString * const kActionTarget = @"buttonActionTarget";
static NSString *const kActionTarget = @"buttonActionTarget";
@interface AbstractActionSheetPicker : NSObject<UIPopoverControllerDelegate>
@property(nonatomic, strong) SWActionSheet * actionSheet;
@property(nonatomic) UIWindowLevel windowLevel;
@interface AbstractActionSheetPicker : NSObject <UIPopoverControllerDelegate>
@property(nonatomic, strong) SWActionSheet *actionSheet;
@property (nonatomic) UIWindowLevel windowLevel;
@property(nonatomic, assign) NSInteger tag;
@property(nonatomic, assign) int borderWidth;
@property(nonatomic, strong) UIToolbar * toolbar;
@property(nonatomic, copy) NSString * title;
@property(nonatomic, strong) UIView * pickerView;
@property(nonatomic, strong) UIToolbar *toolbar;
@property(nonatomic, copy) NSString *title;
@property(nonatomic, strong) UIView *pickerView;
@property(nonatomic, readonly) CGSize viewSize;
@property(nonatomic, strong) NSMutableArray * customButtons;
@property(nonatomic, assign) BOOL hideCancel; // show or hide cancel button.
@property(nonatomic, strong) NSMutableArray *customButtons;
@property(nonatomic, assign) BOOL hideCancel; // show or hide cancel button.
@property(nonatomic, assign) CGRect presentFromRect;
@property(nonatomic)
NSDictionary * titleTextAttributes; // default is nil. Used to specify Title Label attributes.
@property(nonatomic) NSAttributedString *
attributedTitle; // default is nil. If titleTextAttributes not nil this value ignored.
@property(nonatomic)
NSMutableDictionary * pickerTextAttributes; // default with a NSMutableParagraphStyle to set
// label align center. Used to specify Picker Label
// attributes.
@property(nonatomic) UIColor * pickerBackgroundColor;
@property(nonatomic) UIColor * toolbarBackgroundColor;
@property(nonatomic, strong) UIColor * toolbarButtonsColor;
@property(nonatomic) NSNumber * pickerBlurRadius;
@property(nonatomic, retain)
Class popoverBackgroundViewClass; // allow popover customization on iPad
@property(nonatomic)
UIInterfaceOrientationMask supportedInterfaceOrientations; // You can set your own
// supportedInterfaceOrientations
// value to prevent dismissing
// picker in some special cases.
@property(nonatomic) TapAction tapDismissAction; // Specify, which action should be fired in case
// of tapping outside of the picker (on top
// darkened side). Default is TapActionNone.
@property(nonatomic) BOOL popoverDisabled; // Disable popover behavior on iPad
@property(nonatomic) NSDictionary *titleTextAttributes; // default is nil. Used to specify Title Label attributes.
@property(nonatomic) NSAttributedString *attributedTitle; // default is nil. If titleTextAttributes not nil this value ignored.
@property(nonatomic) NSMutableDictionary *pickerTextAttributes; // default with a NSMutableParagraphStyle to set label align center. Used to specify Picker Label attributes.
@property(nonatomic) UIColor *pickerBackgroundColor;
@property(nonatomic) UIColor *toolbarBackgroundColor;
@property(nonatomic, strong) UIColor *toolbarButtonsColor;
@property(nonatomic) NSNumber *pickerBlurRadius;
@property(nonatomic, retain) Class popoverBackgroundViewClass; //allow popover customization on iPad
@property(nonatomic) UIInterfaceOrientationMask supportedInterfaceOrientations; // You can set your own supportedInterfaceOrientations value to prevent dismissing picker in some special cases.
@property(nonatomic) TapAction tapDismissAction; // Specify, which action should be fired in case of tapping outside of the picker (on top darkened side). Default is TapActionNone.
@property(nonatomic) BOOL popoverDisabled; // Disable popover behavior on iPad
- (void)setTextColor:(UIColor *)textColor;
// For subclasses.
- (instancetype)initWithTarget:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
- (instancetype)initWithTarget:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
// Present the ActionSheetPicker
- (void)showActionSheetPicker;
// For subclasses. This is used to send a message to the target upon a successful selection and
// dismissal of the picker (i.e. not canceled).
// For subclasses. This is used to send a message to the target upon a successful selection and dismissal of the picker (i.e. not canceled).
- (void)notifyTarget:(id)target didSucceedWithAction:(SEL)successAction origin:(id)origin;
// For subclasses. This is an optional message upon cancelation of the picker.
@ -118,7 +111,7 @@ static NSString * const kActionTarget = @"buttonActionTarget";
// Adds custom buttons to the left of the UIToolbar that implement specified selector
- (void)addCustomButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)selector;
// For subclasses. This responds to a custom button being pressed.
//For subclasses. This responds to a custom button being pressed.
- (IBAction)customButtonPressed:(id)sender;
// Allow the user to specify a custom cancel button

View file

@ -16,34 +16,22 @@
/////////////////////////////////////////////////////////////////////////
#pragma mark - Properties
/////////////////////////////////////////////////////////////////////////
@property(nonatomic, strong) id<ActionSheetCustomPickerDelegate> delegate;
@property(nonatomic, strong) id <ActionSheetCustomPickerDelegate> delegate;
/////////////////////////////////////////////////////////////////////////
#pragma mark - Init Methods
/////////////////////////////////////////////////////////////////////////
/** Designated init */
- (instancetype)initWithTitle:(NSString *)title
delegate:(id<ActionSheetCustomPickerDelegate>)delegate
showCancelButton:(BOOL)showCancelButton
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title delegate:(id <ActionSheetCustomPickerDelegate>)delegate showCancelButton:(BOOL)showCancelButton origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
delegate:(id<ActionSheetCustomPickerDelegate>)delegate
showCancelButton:(BOOL)showCancelButton
origin:(id)origin
initialSelections:(NSArray *)initialSelections;
- (instancetype)initWithTitle:(NSString *)title delegate:(id <ActionSheetCustomPickerDelegate>)delegate showCancelButton:(BOOL)showCancelButton origin:(id)origin initialSelections:(NSArray *)initialSelections;
/** Convenience class method for creating an launched */
+ (instancetype)showPickerWithTitle:(NSString *)title
delegate:(id<ActionSheetCustomPickerDelegate>)delegate
showCancelButton:(BOOL)showCancelButton
origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title delegate:(id <ActionSheetCustomPickerDelegate>)delegate showCancelButton:(BOOL)showCancelButton origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title delegate:(id <ActionSheetCustomPickerDelegate>)delegate showCancelButton:(BOOL)showCancelButton origin:(id)origin initialSelections:(NSArray *)initialSelections;
+ (instancetype)showPickerWithTitle:(NSString *)title
delegate:(id<ActionSheetCustomPickerDelegate>)delegate
showCancelButton:(BOOL)showCancelButton
origin:(id)origin
initialSelections:(NSArray *)initialSelections;
@end

View file

@ -9,34 +9,31 @@
#import <UIKit/UIKit.h>
#import "AbstractActionSheetPicker.h"
@protocol ActionSheetCustomPickerDelegate<UIPickerViewDelegate, UIPickerViewDataSource>
@protocol ActionSheetCustomPickerDelegate <UIPickerViewDelegate, UIPickerViewDataSource>
@optional
/**
/**
Allow the delegate to override default settings for the picker
Allows for instance, ability to set separate delegates and data sources as well as GUI settings on
the UIPickerView If not defined and explicily overridden then this class will be the delegate and
dataSource.
Allows for instance, ability to set separate delegates and data sources as well as GUI settings on the UIPickerView
If not defined and explicily overridden then this class will be the delegate and dataSource.
*/
- (void)configurePickerView:(UIPickerView *)pickerView
DEPRECATED_MSG_ATTRIBUTE("use -actionSheetPicker:configurePickerView: instead.");
- (void)actionSheetPicker:(AbstractActionSheetPicker *)actionSheetPicker
configurePickerView:(UIPickerView *)pickerView;
- (void)configurePickerView:(UIPickerView *)pickerView DEPRECATED_MSG_ATTRIBUTE("use -actionSheetPicker:configurePickerView: instead.");
- (void)actionSheetPicker:(AbstractActionSheetPicker *)actionSheetPicker configurePickerView:(UIPickerView *)pickerView;
/**
Success callback
\param actionSheetPicker .pickerView property accesses the picker. Requires a cast to UIView
subclass for the picker \param origin The entity which launched the ActionSheetPicker
/**
Success callback
\param actionSheetPicker .pickerView property accesses the picker. Requires a cast to UIView subclass for the picker
\param origin The entity which launched the ActionSheetPicker
*/
- (void)actionSheetPickerDidSucceed:(AbstractActionSheetPicker *)actionSheetPicker
origin:(id)origin;
- (void)actionSheetPickerDidSucceed:(AbstractActionSheetPicker *)actionSheetPicker origin:(id)origin;
/** Cancel callback. See actionSheetPickerDidSuccess:origin: */
- (void)actionSheetPickerDidCancel:(AbstractActionSheetPicker *)actionSheetPicker origin:(id)origin;
@required
@end

View file

@ -1,145 +1,94 @@
//
// Copyright (c) 2011, Tim Cinel
// All rights reserved.
//Copyright (c) 2011, Tim Cinel
//All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import "AbstractActionSheetPicker.h"
@class ActionSheetDatePicker;
typedef void (^ActionDateDoneBlock)(
ActionSheetDatePicker * picker, id selectedDate,
id origin); // selectedDate is NSDate or NSNumber for "UIDatePickerModeCountDownTimer"
typedef void (^ActionDateCancelBlock)(ActionSheetDatePicker * picker);
typedef void(^ActionDateDoneBlock)(ActionSheetDatePicker *picker, id selectedDate, id origin); //selectedDate is NSDate or NSNumber for "UIDatePickerModeCountDownTimer"
typedef void(^ActionDateCancelBlock)(ActionSheetDatePicker *picker);
@interface ActionSheetDatePicker : AbstractActionSheetPicker
@property(nonatomic, retain) NSDate * minimumDate; // specify min/max date range. default is nil.
// When min > max, the values are ignored.
// Ignored in countdown timer mode
@property(nonatomic, retain) NSDate * maximumDate; // default is nil
@property (nonatomic, retain) NSDate *minimumDate; // specify min/max date range. default is nil. When min > max, the values are ignored. Ignored in countdown timer mode
@property (nonatomic, retain) NSDate *maximumDate; // default is nil
@property(nonatomic) NSInteger minuteInterval; // display minutes wheel with interval. interval
// must be evenly divided into 60. default is 1. min
// is 1, max is 30
@property (nonatomic) NSInteger minuteInterval; // display minutes wheel with interval. interval must be evenly divided into 60. default is 1. min is 1, max is 30
@property(nonatomic, retain)
NSLocale * locale; // default is [NSLocale currentLocale]. setting nil returns to default
@property(nonatomic, copy) NSCalendar *
calendar; // default is [NSCalendar currentCalendar]. setting nil returns to default
@property(nonatomic, retain)
NSTimeZone * timeZone; // default is nil. use current time zone or time zone from calendar
@property (nonatomic, retain) NSLocale *locale; // default is [NSLocale currentLocale]. setting nil returns to default
@property (nonatomic, copy) NSCalendar *calendar; // default is [NSCalendar currentCalendar]. setting nil returns to default
@property (nonatomic, retain) NSTimeZone *timeZone; // default is nil. use current time zone or time zone from calendar
@property(nonatomic, assign)
NSTimeInterval countDownDuration; // for UIDatePickerModeCountDownTimer, ignored otherwise.
// default is 0.0. limit is 23:59 (86,399 seconds). value
// being set is div 60 (drops remaining seconds).
@property (nonatomic, assign) NSTimeInterval countDownDuration; // for UIDatePickerModeCountDownTimer, ignored otherwise. default is 0.0. limit is 23:59 (86,399 seconds). value being set is div 60 (drops remaining seconds).
@property(nonatomic, copy) ActionDateDoneBlock onActionSheetDone;
@property(nonatomic, copy) ActionDateCancelBlock onActionSheetCancel;
@property (nonatomic, copy) ActionDateDoneBlock onActionSheetDone;
@property (nonatomic, copy) ActionDateCancelBlock onActionSheetCancel;
+ (instancetype)showPickerWithTitle:(NSString *)title datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate target:(id)target action:(SEL)action origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate target:(id)target action:(SEL)action origin:(id)origin cancelAction:(SEL)cancelAction;
+ (instancetype)showPickerWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
target:(id)target
action:(SEL)action
origin:(id)origin;
datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate
minimumDate:(NSDate *)minimumDate maximumDate:(NSDate *)maximumDate
target:(id)target action:(SEL)action origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
target:(id)target
action:(SEL)action
origin:(id)origin
cancelAction:(SEL)cancelAction;
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
doneBlock:(ActionDateDoneBlock)doneBlock
cancelBlock:(ActionDateCancelBlock)cancelBlock
origin:(UIView*)view;
+ (instancetype)showPickerWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
minimumDate:(NSDate *)minimumDate
maximumDate:(NSDate *)maximumDate
target:(id)target
action:(SEL)action
origin:(id)origin;
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
minimumDate:(NSDate *)minimumDate
maximumDate:(NSDate *)maximumDate
doneBlock:(ActionDateDoneBlock)doneBlock
cancelBlock:(ActionDateCancelBlock)cancelBlock
origin:(UIView*)view;
+ (instancetype)showPickerWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
doneBlock:(ActionDateDoneBlock)doneBlock
cancelBlock:(ActionDateCancelBlock)cancelBlock
origin:(UIView *)view;
+ (instancetype)showPickerWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
minimumDate:(NSDate *)minimumDate
maximumDate:(NSDate *)maximumDate
doneBlock:(ActionDateDoneBlock)doneBlock
cancelBlock:(ActionDateCancelBlock)cancelBlock
origin:(UIView *)view;
- (id)initWithTitle:(NSString *)title datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate target:(id)target action:(SEL)action origin:(id)origin;
- (id)initWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
target:(id)target
action:(SEL)action
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate minimumDate:(NSDate *)minimumDate maximumDate:(NSDate *)maximumDate target:(id)target action:(SEL)action origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
minimumDate:(NSDate *)minimumDate
maximumDate:(NSDate *)maximumDate
target:(id)target
action:(SEL)action
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate target:(id)target action:(SEL)action origin:(id)origin cancelAction:(SEL)cancelAction;
- (instancetype)initWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
target:(id)target
action:(SEL)action
origin:(id)origin
cancelAction:(SEL)cancelAction;
- (instancetype)initWithTitle:(NSString *)title datePickerMode:(UIDatePickerMode)datePickerMode selectedDate:(NSDate *)selectedDate minimumDate:(NSDate *)minimumDate maximumDate:(NSDate *)maximumDate target:(id)target action:(SEL)action cancelAction:(SEL)cancelAction origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
minimumDate:(NSDate *)minimumDate
maximumDate:(NSDate *)maximumDate
target:(id)target
action:(SEL)action
cancelAction:(SEL)cancelAction
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
datePickerMode:(UIDatePickerMode)datePickerMode
selectedDate:(NSDate *)selectedDate
doneBlock:(ActionDateDoneBlock)doneBlock
cancelBlock:(ActionDateCancelBlock)cancelBlock
origin:(UIView *)view;
origin:(UIView*)view;
- (void)eventForDatePicker:(id)sender;

View file

@ -1,78 +1,39 @@
//
// Copyright (c) 2011, Tim Cinel
// All rights reserved.
//Copyright (c) 2011, Tim Cinel
//All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//åLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import "AbstractActionSheetPicker.h"
#import "DistancePickerView.h"
@interface ActionSheetDistancePicker
: AbstractActionSheetPicker<UIPickerViewDelegate, UIPickerViewDataSource>
@interface ActionSheetDistancePicker : AbstractActionSheetPicker <UIPickerViewDelegate, UIPickerViewDataSource>
+ (instancetype)showPickerWithTitle:(NSString *)title
bigUnitString:(NSString *)bigUnitString
bigUnitMax:(NSInteger)bigUnitMax
selectedBigUnit:(NSInteger)selectedBigUnit
smallUnitString:(NSString *)smallUnitString
smallUnitMax:(NSInteger)smallUnitMax
selectedSmallUnit:(NSInteger)selectedSmallUnit
target:(id)target
action:(SEL)action
origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title bigUnitString:(NSString *)bigUnitString bigUnitMax:(NSInteger)bigUnitMax selectedBigUnit:(NSInteger)selectedBigUnit smallUnitString:(NSString *)smallUnitString smallUnitMax:(NSInteger)smallUnitMax selectedSmallUnit:(NSInteger)selectedSmallUnit target:(id)target action:(SEL)action origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
bigUnitString:(NSString *)bigUnitString
bigUnitMax:(NSInteger)bigUnitMax
selectedBigUnit:(NSInteger)selectedBigUnit
smallUnitString:(NSString *)smallUnitString
smallUnitMax:(NSInteger)smallUnitMax
selectedSmallUnit:(NSInteger)selectedSmallUnit
target:(id)target
action:(SEL)action
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title bigUnitString:(NSString *)bigUnitString bigUnitMax:(NSInteger)bigUnitMax selectedBigUnit:(NSInteger)selectedBigUnit smallUnitString:(NSString *)smallUnitString smallUnitMax:(NSInteger)smallUnitMax selectedSmallUnit:(NSInteger)selectedSmallUnit target:(id)target action:(SEL)action origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title
bigUnitString:(NSString *)bigUnitString
bigUnitMax:(NSInteger)bigUnitMax
selectedBigUnit:(NSInteger)selectedBigUnit
smallUnitString:(NSString *)smallUnitString
smallUnitMax:(NSInteger)smallUnitMax
selectedSmallUnit:(NSInteger)selectedSmallUnit
target:(id)target
action:(SEL)action
origin:(id)origin
cancelAction:(SEL)cancelAction;
+ (instancetype)showPickerWithTitle:(NSString *)title bigUnitString:(NSString *)bigUnitString bigUnitMax:(NSInteger)bigUnitMax selectedBigUnit:(NSInteger)selectedBigUnit smallUnitString:(NSString *)smallUnitString smallUnitMax:(NSInteger)smallUnitMax selectedSmallUnit:(NSInteger)selectedSmallUnit target:(id)target action:(SEL)action origin:(id)origin cancelAction:(SEL)cancelAction;
- (instancetype)initWithTitle:(NSString *)title
bigUnitString:(NSString *)bigUnitString
bigUnitMax:(NSInteger)bigUnitMax
selectedBigUnit:(NSInteger)selectedBigUnit
smallUnitString:(NSString *)smallUnitString
smallUnitMax:(NSInteger)smallUnitMax
selectedSmallUnit:(NSInteger)selectedSmallUnit
target:(id)target
action:(SEL)action
origin:(id)origin
cancelAction:(SEL)cancelAction;
- (instancetype)initWithTitle:(NSString *)title bigUnitString:(NSString *)bigUnitString bigUnitMax:(NSInteger)bigUnitMax selectedBigUnit:(NSInteger)selectedBigUnit smallUnitString:(NSString *)smallUnitString smallUnitMax:(NSInteger)smallUnitMax selectedSmallUnit:(NSInteger)selectedSmallUnit target:(id)target action:(SEL)action origin:(id)origin cancelAction:(SEL)cancelAction;
@end

View file

@ -1,41 +1,40 @@
//
// Copyright (c) 2011, Tim Cinel
// All rights reserved.
//Copyright (c) 2011, Tim Cinel
//All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//åLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import "AbstractActionSheetPicker.h"
@class ActionSheetLocalePicker;
typedef void (^ActionLocaleDoneBlock)(ActionSheetLocalePicker * picker, NSTimeZone * selectedValue);
typedef void (^ActionLocaleCancelBlock)(ActionSheetLocalePicker * picker);
typedef void(^ActionLocaleDoneBlock)(ActionSheetLocalePicker *picker, NSTimeZone * selectedValue);
typedef void(^ActionLocaleCancelBlock)(ActionSheetLocalePicker *picker);
static const float firstColumnWidth = 100.0f;
static const float secondColumnWidth = 160.0f;
@interface ActionSheetLocalePicker
: AbstractActionSheetPicker<UIPickerViewDelegate, UIPickerViewDataSource>
@interface ActionSheetLocalePicker : AbstractActionSheetPicker <UIPickerViewDelegate, UIPickerViewDataSource>
/**
* Create and display an action sheet picker.
@ -45,40 +44,20 @@ static const float secondColumnWidth = 160.0f;
* @param target must not be empty. It should respond to "onSuccess" actions.
* @param successAction successAction
* @param cancelActionOrNil cancelAction
* @param origin must not be empty. It can be either an originating container view or a
* UIBarButtonItem to use with a popover arrow.
* @param origin must not be empty. It can be either an originating container view or a UIBarButtonItem to use with a popover arrow.
*
* @return return instance of picker
*/
+ (instancetype)showPickerWithTitle:(NSString *)title
initialSelection:(NSTimeZone *)index
target:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title initialSelection:(NSTimeZone *)index target:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
// Create an action sheet picker, but don't display until a subsequent call to "showActionPicker".
// Receiver must release the picker when ready. */
- (instancetype)initWithTitle:(NSString *)title
initialSelection:(NSTimeZone *)index
target:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
// Create an action sheet picker, but don't display until a subsequent call to "showActionPicker". Receiver must release the picker when ready. */
- (instancetype)initWithTitle:(NSString *)title initialSelection:(NSTimeZone *)index target:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title
initialSelection:(NSTimeZone *)index
doneBlock:(ActionLocaleDoneBlock)doneBlock
cancelBlock:(ActionLocaleCancelBlock)cancelBlock
origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title initialSelection:(NSTimeZone *)index doneBlock:(ActionLocaleDoneBlock)doneBlock cancelBlock:(ActionLocaleCancelBlock)cancelBlock origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
initialSelection:(NSTimeZone *)timeZone
doneBlock:(ActionLocaleDoneBlock)doneBlock
cancelBlock:(ActionLocaleCancelBlock)cancelBlockOrNil
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title initialSelection:(NSTimeZone *)timeZone doneBlock:(ActionLocaleDoneBlock)doneBlock cancelBlock:(ActionLocaleCancelBlock)cancelBlockOrNil origin:(id)origin;
@property(nonatomic, copy) ActionLocaleDoneBlock onActionSheetDone;
@property(nonatomic, copy) ActionLocaleCancelBlock onActionSheetCancel;
@property (nonatomic, copy) ActionLocaleDoneBlock onActionSheetDone;
@property (nonatomic, copy) ActionLocaleCancelBlock onActionSheetCancel;
@end

View file

@ -5,86 +5,61 @@
// Created by Alejandro on 21/07/15.
// Copyright (c) 2015 Petr Korolev. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//åLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import "AbstractActionSheetPicker.h"
@class ActionSheetMultipleStringPicker;
typedef void (^ActionMultipleStringDoneBlock)(ActionSheetMultipleStringPicker * picker,
NSArray * selectedIndexes, id selectedValues);
typedef void (^ActionMultipleStringCancelBlock)(ActionSheetMultipleStringPicker * picker);
typedef void(^ActionMultipleStringDoneBlock)(ActionSheetMultipleStringPicker *picker, NSArray *selectedIndexes, id selectedValues);
typedef void(^ActionMultipleStringCancelBlock)(ActionSheetMultipleStringPicker *picker);
@interface ActionSheetMultipleStringPicker
: AbstractActionSheetPicker<UIPickerViewDelegate, UIPickerViewDataSource>
@interface ActionSheetMultipleStringPicker : AbstractActionSheetPicker <UIPickerViewDelegate, UIPickerViewDataSource>
/**
* Create and display an action sheet picker.
*
* @param title Title label for picker
* @param data is an array of strings to use for the picker's available selection
* choices
* @param data is an array of strings to use for the picker's available selection choices
* @param indexes is used to establish the initially selected row;
* @param target must not be empty. It should respond to "onSuccess" actions.
* @param successAction successAction
* @param cancelActionOrNil cancelAction
* @param origin must not be empty. It can be either an originating container view or a
* UIBarButtonItem to use with a popover arrow.
* @param origin must not be empty. It can be either an originating container view or a UIBarButtonItem to use with a popover arrow.
*
* @return return instance of picker
*/
+ (instancetype)showPickerWithTitle:(NSString *)title
rows:(NSArray *)data
initialSelection:(NSArray *)indexes
target:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title rows:(NSArray *)data initialSelection:(NSArray *)indexes target:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
// Create an action sheet picker, but don't display until a subsequent call to "showActionPicker".
// Receiver must release the picker when ready. */
- (instancetype)initWithTitle:(NSString *)title
rows:(NSArray *)data
initialSelection:(NSArray *)indexes
target:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
// Create an action sheet picker, but don't display until a subsequent call to "showActionPicker". Receiver must release the picker when ready. */
- (instancetype)initWithTitle:(NSString *)title rows:(NSArray *)data initialSelection:(NSArray *)indexes target:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title
rows:(NSArray *)strings
initialSelection:(NSArray *)indexes
doneBlock:(ActionMultipleStringDoneBlock)doneBlock
cancelBlock:(ActionMultipleStringCancelBlock)cancelBlock
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
rows:(NSArray *)strings
initialSelection:(NSArray *)indexes
doneBlock:(ActionMultipleStringDoneBlock)doneBlock
cancelBlock:(ActionMultipleStringCancelBlock)cancelBlockOrNil
origin:(id)origin;
@property(nonatomic, copy) ActionMultipleStringDoneBlock onActionSheetDone;
@property(nonatomic, copy) ActionMultipleStringCancelBlock onActionSheetCancel;
+ (instancetype)showPickerWithTitle:(NSString *)title rows:(NSArray *)strings initialSelection:(NSArray *)indexes doneBlock:(ActionMultipleStringDoneBlock)doneBlock cancelBlock:(ActionMultipleStringCancelBlock)cancelBlock origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title rows:(NSArray *)strings initialSelection:(NSArray *)indexes doneBlock:(ActionMultipleStringDoneBlock)doneBlock cancelBlock:(ActionMultipleStringCancelBlock)cancelBlockOrNil origin:(id)origin;
@property (nonatomic, copy) ActionMultipleStringDoneBlock onActionSheetDone;
@property (nonatomic, copy) ActionMultipleStringCancelBlock onActionSheetCancel;
@end

View file

@ -1,35 +1,35 @@
//
// Copyright (c) 2011, Tim Cinel
// All rights reserved.
//Copyright (c) 2011, Tim Cinel
//All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import "ActionSheetCustomPickerDelegate.h"
#import "AbstractActionSheetPicker.h"
#import "ActionSheetCustomPicker.h"
#import "ActionSheetCustomPickerDelegate.h"
#import "ActionSheetDatePicker.h"
#import "ActionSheetDistancePicker.h"
#import "ActionSheetLocalePicker.h"
#import "ActionSheetMultipleStringPicker.h"
#import "ActionSheetStringPicker.h"
#import "ActionSheetStringPicker.h"
#import "ActionSheetMultipleStringPicker.h"

View file

@ -1,87 +1,62 @@
//
// Copyright (c) 2011, Tim Cinel
// All rights reserved.
//Copyright (c) 2011, Tim Cinel
//All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
//* Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//notice, this list of conditions and the following disclaimer.
//* Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//notice, this list of conditions and the following disclaimer in the
//documentation and/or other materials provided with the distribution.
//* Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//names of its contributors may be used to endorse or promote products
//derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//åLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#import "AbstractActionSheetPicker.h"
@class ActionSheetStringPicker;
typedef void (^ActionStringDoneBlock)(ActionSheetStringPicker * picker, NSInteger selectedIndex,
id selectedValue);
typedef void (^ActionStringCancelBlock)(ActionSheetStringPicker * picker);
typedef void(^ActionStringDoneBlock)(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue);
typedef void(^ActionStringCancelBlock)(ActionSheetStringPicker *picker);
@interface ActionSheetStringPicker
: AbstractActionSheetPicker<UIPickerViewDelegate, UIPickerViewDataSource>
@interface ActionSheetStringPicker : AbstractActionSheetPicker <UIPickerViewDelegate, UIPickerViewDataSource>
/**
* Create and display an action sheet picker.
*
* @param title Title label for picker
* @param data is an array of strings to use for the picker's available selection
* choices
* @param data is an array of strings to use for the picker's available selection choices
* @param index is used to establish the initially selected row;
* @param target must not be empty. It should respond to "onSuccess" actions.
* @param successAction successAction
* @param cancelActionOrNil cancelAction
* @param origin must not be empty. It can be either an originating container view or a
* UIBarButtonItem to use with a popover arrow.
* @param origin must not be empty. It can be either an originating container view or a UIBarButtonItem to use with a popover arrow.
*
* @return return instance of picker
*/
+ (instancetype)showPickerWithTitle:(NSString *)title
rows:(NSArray *)data
initialSelection:(NSInteger)index
target:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title rows:(NSArray *)data initialSelection:(NSInteger)index target:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
// Create an action sheet picker, but don't display until a subsequent call to "showActionPicker".
// Receiver must release the picker when ready. */
- (instancetype)initWithTitle:(NSString *)title
rows:(NSArray *)data
initialSelection:(NSInteger)index
target:(id)target
successAction:(SEL)successAction
cancelAction:(SEL)cancelActionOrNil
origin:(id)origin;
// Create an action sheet picker, but don't display until a subsequent call to "showActionPicker". Receiver must release the picker when ready. */
- (instancetype)initWithTitle:(NSString *)title rows:(NSArray *)data initialSelection:(NSInteger)index target:(id)target successAction:(SEL)successAction cancelAction:(SEL)cancelActionOrNil origin:(id)origin;
+ (instancetype)showPickerWithTitle:(NSString *)title
rows:(NSArray *)strings
initialSelection:(NSInteger)index
doneBlock:(ActionStringDoneBlock)doneBlock
cancelBlock:(ActionStringCancelBlock)cancelBlock
origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title
rows:(NSArray *)strings
initialSelection:(NSInteger)index
doneBlock:(ActionStringDoneBlock)doneBlock
cancelBlock:(ActionStringCancelBlock)cancelBlockOrNil
origin:(id)origin;
@property(nonatomic, copy) ActionStringDoneBlock onActionSheetDone;
@property(nonatomic, copy) ActionStringCancelBlock onActionSheetCancel;
+ (instancetype)showPickerWithTitle:(NSString *)title rows:(NSArray *)strings initialSelection:(NSInteger)index doneBlock:(ActionStringDoneBlock)doneBlock cancelBlock:(ActionStringCancelBlock)cancelBlock origin:(id)origin;
- (instancetype)initWithTitle:(NSString *)title rows:(NSArray *)strings initialSelection:(NSInteger)index doneBlock:(ActionStringDoneBlock)doneBlock cancelBlock:(ActionStringCancelBlock)cancelBlockOrNil origin:(id)origin;
@property (nonatomic, copy) ActionStringDoneBlock onActionSheetDone;
@property (nonatomic, copy) ActionStringCancelBlock onActionSheetCancel;
@end

View file

@ -14,15 +14,15 @@ FOUNDATION_EXPORT double CoreActionSheetPickerVersionNumber;
//! Project version string for CoreActionSheetPicker.
FOUNDATION_EXPORT const unsigned char CoreActionSheetPickerVersionString[];
// In this header, you should import all the public headers of your framework using statements like
// #import <CoreActionSheetPicker/PublicHeader.h>
// In this header, you should import all the public headers of your framework using statements like #import <CoreActionSheetPicker/PublicHeader.h>
#import <CoreActionSheetPicker/AbstractActionSheetPicker.h>
#import <CoreActionSheetPicker/ActionSheetCustomPicker.h>
#import <CoreActionSheetPicker/ActionSheetDatePicker.h>
#import <CoreActionSheetPicker/ActionSheetDistancePicker.h>
#import <CoreActionSheetPicker/ActionSheetLocalePicker.h>
#import <CoreActionSheetPicker/ActionSheetMultipleStringPicker.h>
#import <CoreActionSheetPicker/ActionSheetPicker.h>
#import <CoreActionSheetPicker/ActionSheetStringPicker.h>
#import <CoreActionSheetPicker/DistancePickerView.h>
#import <CoreActionSheetPicker/ActionSheetMultipleStringPicker.h>
#import <CoreActionSheetPicker/DistancePickerView.h>
#import <CoreActionSheetPicker/ActionSheetPicker.h>

View file

@ -11,13 +11,11 @@
#import <UIKit/UIKit.h>
@interface DistancePickerView : UIPickerView
{
NSMutableDictionary * labels;
@interface DistancePickerView : UIPickerView {
NSMutableDictionary *labels;
}
- (void)addLabel:(NSString *)labeltext
forComponent:(NSUInteger)component
forLongestString:(NSString *)longestString;
- (void)updateLabel:(NSString *)labeltext forComponent:(NSUInteger)component;
- (void) addLabel:(NSString *)labeltext forComponent:(NSUInteger)component forLongestString:(NSString *)longestString;
- (void) updateLabel:(NSString *)labeltext forComponent:(NSUInteger)component;
@end

View file

@ -148,7 +148,7 @@ FBSDK_EXTERN NSString *const FBSDKErrorArgumentCollectionKey;
FBSDK_EXTERN NSString *const FBSDKErrorArgumentNameKey;
/**
The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode.
The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode.
*/
FBSDK_EXTERN NSString *const FBSDKErrorArgumentValueKey;

View file

@ -44,5 +44,5 @@
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
#endif
#define FBSDK_VERSION_STRING @"4.28.0"
#define FBSDK_VERSION_STRING @"4.29.0"
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.11"

View file

@ -38,7 +38,8 @@
+ (instancetype)showFromViewController:(UIViewController *)viewController
withContent:(FBSDKAppInviteContent *)content
delegate:(id<FBSDKAppInviteDialogDelegate>)delegate
__attribute__((deprecated("App Invites no longer supported")));
__attribute__ ((deprecated("App Invites no longer supported")));
/**
@ -50,8 +51,7 @@ __attribute__ ((deprecated("use showFromViewController:withContent:delegate: ins
/**
A UIViewController to present the dialog from.
If not specified, the top most view controller will be automatically determined as best as
possible.
If not specified, the top most view controller will be automatically determined as best as possible.
*/
@property (nonatomic, weak) UIViewController *fromViewController;
@ -68,9 +68,9 @@ __attribute__ ((deprecated("use showFromViewController:withContent:delegate: ins
/**
A Boolean value that indicates whether the receiver can initiate an app invite.
May return NO if the appropriate Facebook app is not installed and is required or an access token
is required but not available. This method does not validate the content on the receiver, so this
can be checked before building up the content.
May return NO if the appropriate Facebook app is not installed and is required or an access token is
required but not available. This method does not validate the content on the receiver, so this can be checked before
building up the content.
- See:validateWithError:
- Returns: YES if the receiver can show the dialog, otherwise NO.
@ -85,8 +85,7 @@ __attribute__ ((deprecated("use showFromViewController:withContent:delegate: ins
/**
Validates the content on the receiver.
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the
problem.
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
- Returns: YES if the content is valid, otherwise NO.
*/
- (BOOL)validateWithError:(NSError *__autoreleasing *)errorRef;
@ -96,10 +95,9 @@ __attribute__ ((deprecated("use showFromViewController:withContent:delegate: ins
/**
A delegate for FBSDKAppInviteDialog.
The delegate is notified with the results of the app invite as long as the application has
permissions to receive the information. For example, if the person is not signed into the
containing app, the shower may not be able to distinguish between completion of an app invite and
cancellation.
The delegate is notified with the results of the app invite as long as the application has permissions to
receive the information. For example, if the person is not signed into the containing app, the shower may not be able
to distinguish between completion of an app invite and cancellation.
*/
@protocol FBSDKAppInviteDialogDelegate <NSObject>

View file

@ -27,19 +27,19 @@
Warning: This class is deprecated.
A button to like an object.
Tapping the receiver will invoke an API call to the Facebook app through a fast-app-switch that
allows the object to be liked. Upon return to the calling app, the view will update with the new
state. If the currentAccessToken has "publish_actions" permission and the object is an Open Graph
object, then the like can happen seamlessly without the fast-app-switch.
Tapping the receiver will invoke an API call to the Facebook app through a fast-app-switch that allows
the object to be liked. Upon return to the calling app, the view will update with the new state. If the
currentAccessToken has "publish_actions" permission and the object is an Open Graph object, then the like can happen
seamlessly without the fast-app-switch.
*/
__attribute__((deprecated)) @interface FBSDKLikeButton
: FBSDKButton<FBSDKLiking>
__attribute__ ((deprecated))
@interface FBSDKLikeButton : FBSDKButton <FBSDKLiking>
/**
If YES, a sound is played when the receiver is toggled.
/**
If YES, a sound is played when the receiver is toggled.
@default YES
*/
@property(nonatomic, assign, getter = isSoundEnabled) BOOL soundEnabled;
@default YES
*/
@property (nonatomic, assign, getter = isSoundEnabled) BOOL soundEnabled;
@end

View file

@ -88,16 +88,16 @@ FBSDK_EXTERN NSString *NSStringFromFBSDKLikeControlStyle(FBSDKLikeControlStyle s
Taps on the like button within this control will invoke an API call to the Facebook app through a
fast-app-switch that allows the user to like the object. Upon return to the calling app, the view
will update with the new state and send actions for the UIControlEventValueChanged event.
fast-app-switch that allows the user to like the object. Upon return to the calling app, the view will update
with the new state and send actions for the UIControlEventValueChanged event.
*/
__attribute__((deprecated)) @interface FBSDKLikeControl
: UIControl<FBSDKLiking>
__attribute__ ((deprecated))
@interface FBSDKLikeControl : UIControl <FBSDKLiking>
/**
The foreground color to use for the content of the receiver.
*/
@property(nonatomic, strong) UIColor * foregroundColor;
/**
The foreground color to use for the content of the receiver.
*/
@property (nonatomic, strong) UIColor *foregroundColor;
/**
The position for the auxiliary view for the receiver.

View file

@ -22,6 +22,13 @@
#import <FBSDKShareKit/FBSDKShareAPI.h>
#import <FBSDKShareKit/FBSDKShareConstants.h>
#import <FBSDKShareKit/FBSDKShareLinkContent.h>
#import <FBSDKShareKit/FBSDKShareMediaContent.h>
#import <FBSDKShareKit/FBSDKShareMessengerActionButton.h>
#import <FBSDKShareKit/FBSDKShareMessengerGenericTemplateContent.h>
#import <FBSDKShareKit/FBSDKShareMessengerGenericTemplateElement.h>
#import <FBSDKShareKit/FBSDKShareMessengerMediaTemplateContent.h>
#import <FBSDKShareKit/FBSDKShareMessengerOpenGraphMusicTemplateContent.h>
#import <FBSDKShareKit/FBSDKShareMessengerURLActionButton.h>
#import <FBSDKShareKit/FBSDKShareOpenGraphAction.h>
#import <FBSDKShareKit/FBSDKShareOpenGraphContent.h>
#import <FBSDKShareKit/FBSDKShareOpenGraphObject.h>
@ -48,7 +55,6 @@
#import <FBSDKShareKit/FBSDKShareCameraEffectContent.h>
#import <FBSDKShareKit/FBSDKShareDialog.h>
#import <FBSDKShareKit/FBSDKShareDialogMode.h>
#import <FBSDKShareKit/FBSDKShareMediaContent.h>
#import <FBSDKShareKit/FBSDKSendButton.h>
#else
#import <FBSDKShareKit/FBSDKDeviceShareViewController.h>

View file

@ -0,0 +1,34 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright 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 <Foundation/Foundation.h>
#import <FBSDKCoreKit/FBSDKCopying.h>
/**
A base interface for Messenger share action buttons.
*/
@protocol FBSDKShareMessengerActionButton <FBSDKCopying, NSSecureCoding>
/**
The title displayed to the user for the button.
- Returns: The title for the button.
*/
@property (nonatomic, copy) NSString *title;
@end

View file

@ -0,0 +1,55 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright 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 <Foundation/Foundation.h>
#import <FBSDKShareKit/FBSDKSharingContent.h>
@class FBSDKShareMessengerGenericTemplateElement;
typedef NS_ENUM(NSUInteger, FBSDKShareMessengerGenericTemplateImageAspectRatio) {
FBSDKShareMessengerGenericTemplateImageAspectRatioHorizontal = 0,
FBSDKShareMessengerGenericTemplateImageAspectRatioSquare
};
/**
A model for sharing a generic template element to Messenger. This wrapper element allows
specifying whether or not the bubble is sharable and what aspect to render the images.
See https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic
for more details.
*/
@interface FBSDKShareMessengerGenericTemplateContent : NSObject <FBSDKSharingContent>
/**
This specifies whether or not this generic template message can be shared again after the
initial share. Defaults to false.
*/
@property (nonatomic, assign) BOOL isSharable;
/**
The aspect ratio for when the image is rendered in the generic template bubble after being
shared. Defaults to horizontal.
*/
@property (nonatomic, assign) FBSDKShareMessengerGenericTemplateImageAspectRatio imageAspectRatio;
/**
A generic template element with a title, optional subtitle, optional image, etc. Required.
*/
@property (nonatomic, copy) FBSDKShareMessengerGenericTemplateElement *element;
@end

View file

@ -0,0 +1,56 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright 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 <Foundation/Foundation.h>
#import <FBSDKCoreKit/FBSDKCopying.h>
#import <FBSDKShareKit/FBSDKShareMessengerActionButton.h>
/**
A model for sharing a generic template element to Messenger. This allows specifying title, subtitle,
image, default action, and any other buttons. Title is required. See
https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic for more details.
*/
@interface FBSDKShareMessengerGenericTemplateElement : NSObject <FBSDKCopying, NSSecureCoding>
/**
The rendered title for the shared generic template element. Required.
*/
@property (nonatomic, copy) NSString *title;
/**
The rendered subtitle for the shared generic template element. Optional.
*/
@property (nonatomic, copy) NSString *subtitle;
/**
The image url that will be downloaded and rendered at the top of the generic template. Optional.
*/
@property (nonatomic, copy) NSURL *imageURL;
/**
The default action executed when this shared generic tempate is tapped. Title for this button is ignored. Optional.
*/
@property (nonatomic, copy) id<FBSDKShareMessengerActionButton> defaultAction;
/**
This specifies what action button to show below the generic template. Optional.
*/
@property (nonatomic, copy) id<FBSDKShareMessengerActionButton> button;
@end

View file

@ -0,0 +1,69 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright 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 <Foundation/Foundation.h>
#import <FBSDKShareKit/FBSDKShareMessengerActionButton.h>
#import <FBSDKShareKit/FBSDKSharingContent.h>
typedef NS_ENUM(NSUInteger, FBSDKShareMessengerMediaTemplateMediaType) {
FBSDKShareMessengerMediaTemplateMediaTypeImage = 0,
FBSDKShareMessengerMediaTemplateMediaTypeVideo
};
/**
A model for sharing media template content. See
https://developers.facebook.com/docs/messenger-platform/send-messages/template/media for details.
*/
@interface FBSDKShareMessengerMediaTemplateContent : NSObject <FBSDKSharingContent>
/**
The media type (image or video) for this content. This must match the media type specified in the
attachmentID/mediaURL to avoid an error when sharing. Defaults to image.
*/
@property (nonatomic, assign) FBSDKShareMessengerMediaTemplateMediaType mediaType;
/**
The attachmentID of the item to share. Optional, but either attachmentID or mediaURL must be specified.
*/
@property (nonatomic, copy, readonly) NSString *attachmentID;
/**
The Facebook url for this piece of media. External urls will not work; this must be a Facebook url.
See https://developers.facebook.com/docs/messenger-platform/send-messages/template/media for details.
Optional, but either attachmentID or mediaURL must be specified.
*/
@property (nonatomic, copy, readonly) NSURL *mediaURL;
/**
This specifies what action button to show below the media. Optional.
*/
@property (nonatomic, copy) id<FBSDKShareMessengerActionButton> button;
/**
Custom initializer to create media template share with attachment id.
*/
- (instancetype)initWithAttachmentID:(NSString *)attachmentID;
/**
Custom initializer to create media template share with media url. This must be a Facebook url
and cannot be an external url.
*/
- (instancetype)initWithMediaURL:(NSURL *)mediaURL;
@end

View file

@ -0,0 +1,41 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright 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 <Foundation/Foundation.h>
#import <FBSDKShareKit/FBSDKShareMessengerActionButton.h>
#import <FBSDKShareKit/FBSDKSharingContent.h>
/**
This share content allows sharing a bubble that plays songs with Open Graph music.
See https://developers.facebook.com/docs/messenger-platform/send-messages/template/open-graph
for details. Passing <FBSDKSharingContent> property pageID is required for this type of share.
*/
@interface FBSDKShareMessengerOpenGraphMusicTemplateContent : NSObject <FBSDKSharingContent>
/**
This must be an Open Graph music url. Required.
*/
@property (nonatomic, copy) NSURL *url;
/**
This specifies what action button to show below the open graph music bubble. Optional.
*/
@property (nonatomic, copy) id<FBSDKShareMessengerActionButton> button;
@end

View file

@ -0,0 +1,62 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright 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 <Foundation/Foundation.h>
#import <FBSDKShareKit/FBSDKShareMessengerActionButton.h>
typedef NS_ENUM(NSUInteger, FBSDKShareMessengerURLActionButtonWebviewHeightRatio) {
FBSDKShareMessengerURLActionButtonWebviewHeightRatioFull = 0,
FBSDKShareMessengerURLActionButtonWebviewHeightRatioTall,
FBSDKShareMessengerURLActionButtonWebviewHeightRatioCompact
};
/**
A model for a Messenger share URL action button.
*/
@interface FBSDKShareMessengerURLActionButton : NSObject <FBSDKShareMessengerActionButton>
/**
The url that this button should open when tapped. Required.
*/
@property (nonatomic, copy) NSURL *url;
/**
This controls the display height of the webview when shown in the Messenger app. Defaults to Full.
*/
@property (nonatomic, assign) FBSDKShareMessengerURLActionButtonWebviewHeightRatio webviewHeightRatio;
/**
This must be true if the url is a Messenger Extensions url. Defaults to NO.
*/
@property (nonatomic, assign) BOOL isMessengerExtensionURL;
/**
This is a fallback url for a Messenger Extensions enabled button. It is used on clients that do not support
Messenger Extensions. If this is not defined, the url will be used as a fallback. Optional, but ignored
unless isMessengerExtensionURL == YES.
*/
@property (nonatomic, copy) NSURL *fallbackURL;
/**
This controls whether we want to hide the share button in the webview or not. It is useful to hide the share
button when the webview is user-specific and contains sensitive information. Defaults to NO.
*/
@property (nonatomic, assign) BOOL shouldHideWebviewShareButton;
@end

View file

@ -62,4 +62,16 @@
*/
@property (nonatomic, copy) NSString *ref;
/**
For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share.
- Returns: The ID of the Facebok page this share is associated with.
*/
@property (nonatomic, copy) NSString *pageID;
/**
A unique identifier for a share involving this content, useful for tracking purposes.
- Returns: A unique string identifying this share data.
*/
@property (nonatomic, copy, readonly) NSString *shareUUID;
@end

View file

@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
// Generated by Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

View file

@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
// Generated by Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

View file

@ -1,4 +1,4 @@
// Generated by Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
// Generated by Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

Some files were not shown because too many files have changed in this diff Show more