|
@@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
@param imageCache The image cache.
|
|
|
*/
|
|
|
-+ (void)setSharedImageCache:(id <AFImageCache>)imageCache;
|
|
|
++ (void)setSharedImageCache:(__nullable id <AFImageCache>)imageCache;
|
|
|
|
|
|
///------------------------------------
|
|
|
/// @name Accessing Response Serializer
|
|
@@ -103,13 +103,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
@param state The control state.
|
|
|
@param urlRequest The URL request used for the image request.
|
|
|
@param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes.
|
|
|
- @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the request and response parameters will be `nil`.
|
|
|
+ @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the response parameter will be `nil`.
|
|
|
@param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred.
|
|
|
*/
|
|
|
- (void)setImageForState:(UIControlState)state
|
|
|
withURLRequest:(NSURLRequest *)urlRequest
|
|
|
placeholderImage:(nullable UIImage *)placeholderImage
|
|
|
- success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
|
|
|
+ success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * __nullable response, UIImage *image))success
|
|
|
failure:(nullable void (^)(NSError *error))failure;
|
|
|
|
|
|
|
|
@@ -151,11 +151,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
@param state The control state.
|
|
|
@param urlRequest The URL request used for the image request.
|
|
|
@param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes.
|
|
|
+ @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the response parameter will be `nil`.
|
|
|
+ @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred.
|
|
|
*/
|
|
|
- (void)setBackgroundImageForState:(UIControlState)state
|
|
|
withURLRequest:(NSURLRequest *)urlRequest
|
|
|
placeholderImage:(nullable UIImage *)placeholderImage
|
|
|
- success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
|
|
|
+ success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * __nullable response, UIImage *image))success
|
|
|
failure:(nullable void (^)(NSError *error))failure;
|
|
|
|
|
|
|