SBSBarcodeGenerator Class Reference

Inherits NSObject.

Instance Methods

(nullable UIImage *) - generateFromString:error:
 
(nullable UIImage *) - generateFromData:error:
 
(nullable UIImage *) - generateFromData:encodings:error:
 
(BOOL) - setOptions:error:
 

Detailed Description

A barcode generator.

Enumeration of different error types related to the.

Since
5.9.0

Method Documentation

- (nullable UIImage *) generateFromString: (nullable NSString *)  string
error: (NSError *_Nullable *_Nullable)  outError 

Generates a UIImage instance holding the encoded data.

Parameters
stringthe string to be encoded. Can be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
the encoded data as a UIImage or nil if there was an error.
Since
5.9.0
- (nullable UIImage *) generateFromData: (nullable NSData *)  data
error: (NSError *_Nullable *_Nullable)  outError 

Generates a UIImage instance holding the encoded data.

Parameters
datathe NSData to be encoded. Can be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
the encoded data as a UIImage or nil if there was an error.
Since
5.9.0
- (nullable UIImage *) generateFromData: (nullable NSData *)  data
encodings: (nullable NSArray< SBSEncodingRange * > *)  encodings
error: (NSError *_Nullable *_Nullable)  outError 

Generates a UIImage instance holding the encoded data.

Parameters
datathe NSData to be encoded. Can be nil.
encodingsthe NSArray of SBSEncodingRange instances. Can be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
the encoded data as a UIImage or nil if there was an error.
Since
5.9.0
- (BOOL) setOptions: (NSDictionary< NSString *, id > *)  options
error: (NSError *_Nullable *_Nullable)  outError 

Sets the given options to the generator enine.

Parameters
optionsthe NSDictionary of options. Cannot be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
YES if the operation was successful. NO upon failure.
Since
5.9.0

The documentation for this class was generated from the following file: