SizeAPI
@protocol SizeAPI <NSObject>
The protocol for the Size API.
-
Provides a list of all the available size scales.
This can be used to know what scales are available for size conversions.
Declaration
Objective-C
- (void)getSizes:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func getSizes(_ callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
callback
A block that receives the size scales list as parameter.
-
Provides a list of all the available size scales.
This can be used to know what scales are available for size conversions.
Declaration
Objective-C
- (void)getSizes:(nonnull NSDictionary *)options callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func getSizes(_ options: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
options
A map with options to configure the request.
callback
A block that receives the size scales list as parameter.
-
Provides a list of all the available size scales.
This can be used to know what scales are available for size conversions.
Return Value
A Promise that will be resolved with the size scales list.
-
Provides a list of all the available size scales.
This can be used to know what scales are available for size conversions.
Declaration
Objective-C
- (nonnull Promise *)getSizesP:(nonnull NSDictionary *)options;
Swift
optional func getSizesP(_ options: Any!) -> Any!
Parameters
options
A map with options to configure the request.
Return Value
A Promise that will be resolved with the size scales list.
-
Converts a size value from the native scale to the corresponding value in the specified scale.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)sizeToNative:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func size(toNative scale: Any!, value: Double, gender: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scale
The scale which one wants to convert to.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
callback
A block that receives the converted value as parameter.
-
Converts a size value from the native scale to the corresponding value in the specified scale.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)sizeToNative:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender options:(nonnull NSDictionary *)options callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func size(toNative scale: Any!, value: Double, gender: Any!, options: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scale
The scale which one wants to convert to.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
options
A map with options to configure the request.
callback
A block that receives the converted value as parameter.
-
Converts a size value from the native scale to the corresponding value in the specified scale.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)sizeToNativeP:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender;
Swift
optional func size(toNativeP scale: Any!, value: Double, gender: Any!) -> Any!
Parameters
scale
The scale which one wants to convert to.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
Return Value
A Promise that will resolve with the converted value.
-
Converts a size value from the native scale to the corresponding value in the specified scale.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)sizeToNativeP:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender options:(nonnull NSDictionary *)options;
Swift
optional func size(toNativeP scale: Any!, value: Double, gender: Any!, options: Any!) -> Any!
Parameters
scale
The scale which one wants to convert to.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
options
A map with options to configure the request.
Return Value
A Promise that will resolve with the converted value.
-
Converts multiple size values from the native scale to the corresponding values in the specified scales.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)sizeToNativeB:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders callback:(nonnull void (^)(NSArray *_Nonnull))callback;
Swift
optional func size(toNativeB scales: Any!, values: Any!, genders: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scales
A list of scales to convert to.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
callback
A block that receives a list with the converted values as an argument.
-
Converts multiple size values from the native scale to the corresponding values in the specified scales.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)sizeToNativeB:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders options:(nonnull NSDictionary *)options callback:(nonnull void (^)(NSArray *_Nonnull))callback;
Swift
optional func size(toNativeB scales: Any!, values: Any!, genders: Any!, options: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scales
A list of scales to convert to.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
options
A map with options to configure the request.
callback
A block that receives a list with the converted values as an argument.
-
Converts multiple size values from the native scale to the corresponding values in the specified scales.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)sizeToNativeBP:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders;
Swift
optional func size(toNativeBP scales: Any!, values: Any!, genders: Any!) -> Any!
Parameters
scales
A list of scales to convert to.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
Return Value
A Promise that will resolve with a list with the converted values.
-
Converts multiple size values from the native scale to the corresponding values in the specified scales.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)sizeToNativeBP:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders options:(nonnull NSDictionary *)options;
Swift
optional func size(toNativeBP scales: Any!, values: Any!, genders: Any!, options: Any!) -> Any!
Parameters
scales
A list of scales to convert to.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
options
A map with options to configure the request.
Return Value
A Promise that will resolve with a list with the converted values.
-
Converts a size value in the specified scale to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)nativeToSize:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func native(toSize scale: Any!, value: Double, gender: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scale
The scale which one wants to convert from.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
callback
A block that receives the native value as parameter.
-
Converts a size value in the specified scale to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)nativeToSize:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender options:(nonnull NSDictionary *)options callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func native(toSize scale: Any!, value: Double, gender: Any!, options: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scale
The scale which one wants to convert from.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
options
A map with options to configure the request.
callback
A block that receives the native value as parameter.
-
Converts a size value in the specified scale to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)nativeToSizeP:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender;
Swift
optional func native(toSizeP scale: Any!, value: Double, gender: Any!) -> Any!
Parameters
scale
The scale which one wants to convert from.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
Return Value
A Promise that will resolve with the native value.
-
Converts a size value in the specified scale to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)nativeToSizeP:(nonnull NSString *)scale value:(double)value gender:(nonnull NSString *)gender options:(nonnull NSDictionary *)options;
Swift
optional func native(toSizeP scale: Any!, value: Double, gender: Any!, options: Any!) -> Any!
Parameters
scale
The scale which one wants to convert from.
value
The value which one wants to convert.
gender
The gender of the scale and value to be converted.
Return Value
A Promise that will resolve with the native value.
-
Converts multiple size values to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)nativeToSizeB:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders callback:(nonnull void (^)(NSArray *_Nonnull))callback;
Swift
optional func native(toSizeB scales: Any!, values: Any!, genders: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scales
A list of scales to convert from.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
callback
A block that receives a list with the native values as an argument.
-
Converts multiple size values to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (void)nativeToSizeB:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders options:(nonnull NSDictionary *)options callback:(nonnull void (^)(NSArray *_Nonnull))callback;
Swift
optional func native(toSizeB scales: Any!, values: Any!, genders: Any!, options: Any!, callback: ((UnsafeMutablePointer<Int32>?) -> Void)!)
Parameters
scales
A list of scales to convert to.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
options
A map with options to configure the request.
callback
A block that receives a list with the converted values as an argument.
-
Converts multiple size values to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizes:]
Declaration
Objective-C
- (nonnull Promise *)nativeToSizeBP:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders;
Swift
optional func native(toSizeBP scales: Any!, values: Any!, genders: Any!) -> Any!
Parameters
scales
A list of scales to convert from.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
Return Value
A Promise that will resolve with a list with the native values.
-
Converts multiple size values to the corresponding native size.
The available scales, genders and sizes can be obtained with the method
-[SizeAPI getSizesP:]
Declaration
Objective-C
- (nonnull Promise *)nativeToSizeBP:(nonnull NSArray *)scales values:(nonnull NSArray *)values genders:(nonnull NSArray *)genders options:(nonnull NSDictionary *)options;
Swift
optional func native(toSizeBP scales: Any!, values: Any!, genders: Any!, options: Any!) -> Any!
Parameters
scales
A list of scales to convert to.
values
A list of values to convert.
genders
A list of genders corresponding to the values.
options
A map with options to configure the request.
Return Value
A Promise that will resolve with a list with the native values.