BTUIKViewUtil
Objective-C
@interface BTUIKViewUtil : NSObject
Swift
class BTUIKViewUtil : NSObject
@class Utilities used by other views to get localized strings, a BTUIKPaymentOptionType or artwork
-
Get a BTUIKPaymentOptionType from a string
Declaration
Objective-C
+ (BTUIKPaymentOptionType)paymentOptionTypeForPaymentInfoType: (NSString *)typeString;
Swift
class func paymentOptionType(forPaymentInfoType typeString: String!) -> BTUIKPaymentOptionType
Parameters
typeString
string representing a payment option type (e.g
Visa
orPayPal
)Return Value
The BTUIKPaymentOptionType associated with the string if it can be found. Otherwise, BTUIKPaymentOptionTypeUnknown.
-
Get a BTUIKPaymentOptionType from a BTUIKCardType
Declaration
Objective-C
+ (BTUIKPaymentOptionType)paymentMethodTypeForCardType: (BTUIKCardType *)cardType;
Swift
class func paymentMethodType(for cardType: BTUIKCardType!) -> BTUIKPaymentOptionType
Parameters
cardType
A BTUIKCardType that represents a card
Return Value
The BTUIKPaymentOptionType associated with the BTUIKCardType if it can be found. Otherwise, BTUIKPaymentOptionTypeUnknown.
-
Determine if the payment option is a credit card type.
Declaration
Objective-C
+ (BOOL)isPaymentOptionTypeACreditCard: (BTUIKPaymentOptionType)paymentOptionType;
Swift
class func isPaymentOptionTypeACreditCard(_ paymentOptionType: BTUIKPaymentOptionType) -> Bool
Parameters
paymentOptionType
A BTUIKPaymentOptionType
Return Value
true if the payment option is a credit card type, false otherwise
-
Get a localized string for a payment option.
Declaration
Objective-C
+ (NSString *)nameForPaymentMethodType: (BTUIKPaymentOptionType)paymentMethodType;
Swift
class func name(forPaymentMethodType paymentMethodType: BTUIKPaymentOptionType) -> String!
Parameters
paymentMethodType
BTUIKPaymentOptionType
Return Value
The localized string for the BTUIKPaymentOptionType if one can be found.
Card
will be returned in the case of BTUIKPaymentOptionTypeUnknown.
-
Cause the device to vibrate
Declaration
Objective-C
+ (void)vibrate;
Swift
class func vibrate()
-
Get a BTUIKVectorArtView from a string
Declaration
Objective-C
+ (BTUIKVectorArtView *)vectorArtViewForPaymentInfoType:(NSString *)typeString;
Swift
class func vectorArtView(forPaymentInfoType typeString: String!) -> BTUIKVectorArtView!
Parameters
typeString
string representing a payment option type (e.g
Visa
orPayPal
)Return Value
The BTUIKVectorArtView for the string if one can be found. Otherwise the art for a generic card.
-
Get a BTUIKVectorArtView for a payment option of BTUIKVectorArtIconSizeRegular.
Declaration
Objective-C
+ (BTUIKVectorArtView *)vectorArtViewForPaymentOptionType: (BTUIKPaymentOptionType)type;
Swift
class func vectorArtView(for type: BTUIKPaymentOptionType) -> BTUIKVectorArtView!
Parameters
type
BTUIKPaymentOptionType
Return Value
The BTUIKVectorArtView for the BTUIKPaymentOptionType if one can be found. Otherwise the art for a generic card.
-
Get a BTUIKVectorArtView for a payment option.
Declaration
Objective-C
+ (BTUIKVectorArtView *) vectorArtViewForPaymentOptionType:(BTUIKPaymentOptionType)type size:(BTUIKVectorArtSize)size;
Swift
class func vectorArtView(for type: BTUIKPaymentOptionType, size: BTUIKVectorArtSize) -> BTUIKVectorArtView!
Parameters
type
BTUIKPaymentOptionType
size
The BTUIKVectorArtSize (Regular or Large)
Return Value
The BTUIKVectorArtView for the BTUIKPaymentOptionType if one can be found. Otherwise the art for a generic card.
-
Undocumented
Declaration
Objective-C
+ (BTUIKVectorArtView *)vectorArtViewForVisualAssetType: (BTUIKVisualAssetType)type;
Swift
class func vectorArtView(for type: BTUIKVisualAssetType) -> BTUIKVectorArtView!
-
Declaration
Objective-C
+ (BOOL)isLanguageLayoutDirectionRightToLeft;
Swift
class func isLanguageLayoutDirectionRightToLeft() -> Bool
Return Value
true if the language is right to left
-
Declaration
Objective-C
+ (NSTextAlignment)naturalTextAlignment;
Swift
class func naturalTextAlignment() -> NSTextAlignment
Return Value
NSTextAlignmentRight if isLanguageLayoutDirectionRightToLeft is true. Ohterwise NSTextAlignmentLeft.
-
Declaration
Objective-C
+ (NSTextAlignment)naturalTextAlignmentInverse;
Swift
class func naturalTextAlignmentInverse() -> NSTextAlignment
Return Value
NSTextAlignmentLeft if isLanguageLayoutDirectionRightToLeft is true. Ohterwise NSTextAlignmentRight.
-
Declaration
Objective-C
+ (BOOL)isOrientationLandscape;
Swift
class func isOrientationLandscape() -> Bool
Return Value
true if the device is in landscape
-
Declaration
Objective-C
+ (CGFloat)statusBarHeight;
Swift
class func statusBarHeight() -> CGFloat
Return Value
height of the status bar