Use property instead of method for UIButton/NSButton current url.

This commit is contained in:
DreamPiggy 2018-01-26 22:40:28 +08:00
parent 46b62cfb70
commit e5cb977bc8
3 changed files with 4 additions and 15 deletions

View File

@ -19,7 +19,7 @@
/** /**
* Get the current image URL. * Get the current image URL.
*/ */
- (nullable NSURL *)sd_currentImageURL; @property (nonatomic, strong, readonly, nullable) NSURL *sd_currentImageURL;
/** /**
* Set the button `image` with an `url`. * Set the button `image` with an `url`.
@ -133,7 +133,7 @@
/** /**
* Get the current alternateImage URL. * Get the current alternateImage URL.
*/ */
- (nullable NSURL *)sd_currentAlternateImageURL; @property (nonatomic, strong, readonly, nullable) NSURL *sd_currentAlternateImageURL;
/** /**
* Set the button `alternateImage` with an `url`. * Set the button `alternateImage` with an `url`.

View File

@ -67,8 +67,6 @@ typedef void (^SDWebImageTransitionCompletionBlock)(BOOL finished);
@interface SDWebImageTransition (Conveniences) @interface SDWebImageTransition (Conveniences)
// class property is available in Xcode 8. We will drop the Xcode 7.3 support in 5.x
#if __has_feature(objc_class_property)
/// Fade transition. /// Fade transition.
@property (nonatomic, class, nonnull, readonly) SDWebImageTransition *fadeTransition; @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *fadeTransition;
/// Flip from left transition. /// Flip from left transition.
@ -83,15 +81,6 @@ typedef void (^SDWebImageTransitionCompletionBlock)(BOOL finished);
@property (nonatomic, class, nonnull, readonly) SDWebImageTransition *curlUpTransition; @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *curlUpTransition;
/// Curl down transition. /// Curl down transition.
@property (nonatomic, class, nonnull, readonly) SDWebImageTransition *curlDownTransition; @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *curlDownTransition;
#else
+ (nonnull instancetype)fadeTransition;
+ (nonnull instancetype)flipFromLeftTransition;
+ (nonnull instancetype)flipFromRightTransition;
+ (nonnull instancetype)flipFromTopTransition;
+ (nonnull instancetype)flipFromBottomTransition;
+ (nonnull instancetype)curlUpTransition;
+ (nonnull instancetype)curlDownTransition;
#endif
@end @end

View File

@ -22,7 +22,7 @@
/** /**
* Get the current image URL. * Get the current image URL.
*/ */
- (nullable NSURL *)sd_currentImageURL; @property (nonatomic, strong, readonly, nullable) NSURL *sd_currentImageURL;
/** /**
* Get the image URL for a control state. * Get the image URL for a control state.
@ -133,7 +133,7 @@
/** /**
* Get the current background image URL. * Get the current background image URL.
*/ */
- (nullable NSURL *)sd_currentBackgroundImageURL; @property (nonatomic, strong, readonly, nullable) NSURL *sd_currentBackgroundImageURL;
/** /**
* Get the background image URL for a control state. * Get the background image URL for a control state.