Skip to content

Commit

Permalink
Clarify NYTPhoto docs about image vs imageData
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Jan 28, 2016
1 parent 8ece787 commit 043299b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Pod/Classes/ios/Protocols/NYTPhoto.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,24 @@ NS_ASSUME_NONNULL_BEGIN

/**
* The image to display.
*
* This property is used if and only if `-imageData` returns `nil`, but note that using `UIImage`s whenever possible will result in better performance. See `-imageData`'s documentation for discussion.
*/
@property (nonatomic, readonly, nullable) UIImage *image;

/**
* The image data to display. This will be preferred over the `image` property.
* In case this is empty `image` will be used. The main advantage of using this is animated gif support.
* The image data to display.
*
* This property's value is preferred over `-image`, if `imageData` is non-`nil`. This allows clients to provide image data for FLAnimatedImage when the library is compiled with `ANIMATED_GIF_SUPPORT` defined.
*
* Note that if you're working with a non-animated image, using a native `UIImage` will provide better performance. Therefore, it is recommended to return `nil` from this property unless this photo is an animated GIF.
*/
@property (nonatomic, readonly, nullable) NSData *imageData;

/**
* A placeholder image for display while the image is loading.
*
* This property is used if and only if `-imageData` returns `nil`.
*/
@property (nonatomic, readonly, nullable) UIImage *placeholderImage;

Expand Down

0 comments on commit 043299b

Please sign in to comment.