| | |
| | | */ |
| | | @interface UIButton (WebCache) |
| | | |
| | | #pragma mark - Image |
| | | |
| | | /** |
| | | * Get the current image URL. |
| | | */ |
| | | - (nullable NSURL *)sd_currentImageURL; |
| | | |
| | | #pragma mark - Image |
| | | |
| | | /** |
| | | * Get the image URL for a control state. |
| | |
| | | * @param state The state that uses the specified title. The values are described in UIControlState. |
| | | */ |
| | | - (void)sd_setImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state; |
| | | forState:(UIControlState)state NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the imageView `image` with an `url` and a placeholder. |
| | |
| | | */ |
| | | - (void)sd_setImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state |
| | | placeholderImage:(nullable UIImage *)placeholder; |
| | | placeholderImage:(nullable UIImage *)placeholder NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the imageView `image` with an `url`, placeholder and custom options. |
| | |
| | | - (void)sd_setImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state |
| | | placeholderImage:(nullable UIImage *)placeholder |
| | | options:(SDWebImageOptions)options; |
| | | options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the imageView `image` with an `url`. |
| | |
| | | - (void)sd_setImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state |
| | | placeholderImage:(nullable UIImage *)placeholder |
| | | completed:(nullable SDExternalCompletionBlock)completedBlock; |
| | | completed:(nullable SDExternalCompletionBlock)completedBlock NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the imageView `image` with an `url`, placeholder and custom options. |
| | |
| | | options:(SDWebImageOptions)options |
| | | completed:(nullable SDExternalCompletionBlock)completedBlock; |
| | | |
| | | #pragma mark - Background image |
| | | #pragma mark - Background Image |
| | | |
| | | /** |
| | | * Get the current background image URL. |
| | | */ |
| | | - (nullable NSURL *)sd_currentBackgroundImageURL; |
| | | |
| | | /** |
| | | * Get the background image URL for a control state. |
| | | * |
| | | * @param state Which state you want to know the URL for. The values are described in UIControlState. |
| | | */ |
| | | - (nullable NSURL *)sd_backgroundImageURLForState:(UIControlState)state; |
| | | |
| | | /** |
| | | * Set the backgroundImageView `image` with an `url`. |
| | |
| | | * @param state The state that uses the specified title. The values are described in UIControlState. |
| | | */ |
| | | - (void)sd_setBackgroundImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state; |
| | | forState:(UIControlState)state NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the backgroundImageView `image` with an `url` and a placeholder. |
| | |
| | | */ |
| | | - (void)sd_setBackgroundImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state |
| | | placeholderImage:(nullable UIImage *)placeholder; |
| | | placeholderImage:(nullable UIImage *)placeholder NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the backgroundImageView `image` with an `url`, placeholder and custom options. |
| | |
| | | - (void)sd_setBackgroundImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state |
| | | placeholderImage:(nullable UIImage *)placeholder |
| | | options:(SDWebImageOptions)options; |
| | | options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the backgroundImageView `image` with an `url`. |
| | |
| | | - (void)sd_setBackgroundImageWithURL:(nullable NSURL *)url |
| | | forState:(UIControlState)state |
| | | placeholderImage:(nullable UIImage *)placeholder |
| | | completed:(nullable SDExternalCompletionBlock)completedBlock; |
| | | completed:(nullable SDExternalCompletionBlock)completedBlock NS_REFINED_FOR_SWIFT; |
| | | |
| | | /** |
| | | * Set the backgroundImageView `image` with an `url`, placeholder and custom options. |