Skip to content

Commit

Permalink
Update to v2.12.0 (#40)
Browse files Browse the repository at this point in the history
* Update to v2.12.0

- Fix bug in Fetch Helper related to view hide/show
- Update global config defaults for memory cache sizes
- Add HEIC/AVCI support (when available on the device)

* update build for travis ci

(Note: Travis CI virtual boxes do not have the resources to run the unit tests anymore.)
  • Loading branch information
NSProgrammer authored Jan 3, 2019
1 parent ebcca85 commit 8b3eff1
Show file tree
Hide file tree
Showing 25 changed files with 289 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: objective-c
osx_image: xcode10
osx_image: xcode10.1
script:
./build.sh
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@

## Info

**Document version:** 2.11.0
**Document version:** 2.12.0

**Last updated:** 09/03/2018
**Last updated:** 12/18/2018

**Author:** Nolan O'Brien

## History

### 2.12.0

- Add `TIPImageTypeHEIC` and `TIPImageTypeAVCI` support
- There are OS version limitations, see `TIPImageTypes.h` for details

### 2.11.1

- Update defaults in `TIPGlobalConfiguration` for cache sizes
- `TIPMaxBytesForAllRenderedCachesDefault` and `TIPMaxBytesForAllMemoryCachesDefault`
- the lesser of `System RAM / 12` or `160 MBs`
- `TIPMaxCountForAllRenderedCachesDefault` and `TIPMaxCountForAllMemoryCachesDefault`
- default cap to `255` instead of `511`

### 2.11.0

- add support for animated images with `TIPImageViewFetchHelper` by supporting `TIPImageContainer` as well as `UIImage`
Expand Down
5 changes: 3 additions & 2 deletions ImageSpeedComparison/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
{ @"public.tiff", "TIFF", "twitterfied.tiff", NO, NO },
{ @"com.compuserve.gif", "GIF", "fireworks_original.gif", NO, YES },
{ @"com.google.webp", "WEBP", "twitterfied.webp", NO, NO },
{ @"public.heic", "HEIC", "twitterfied.heic", NO, NO },
{ @"public.jpeg", "Small-PJPEG", "twitterfied.small.pjpg", YES, NO },
};

Expand Down Expand Up @@ -391,8 +392,8 @@ - (NSString *)tip_transformerIdentifier

//- (NSDictionary *)progressiveLoadingPolicies
//{
// if ([sImageTypes[_imageTypeIndex].type isEqualToString:TIPImageTypeJPEG2000] || [sImageTypes[_imageTypeIndex].type isEqualToString:TIPImageTypePNG]) {
// if (sImageTypes[_imageTypeIndex].isProgressive) {
// if (sImageTypes[_imageTypeIndex].isProgressive) {
// if (![sImageTypes[_imageTypeIndex].type isEqualToString:TIPImageTypeJPEG]) {
// return @{ sImageTypes[_imageTypeIndex].type : [[TIPGreedyProgressiveLoadingPolicy alloc] init] };
// }
// }
Expand Down
Binary file added ImageSpeedComparison/twitterfied.heic
Binary file not shown.
Binary file added TIPTestsResources.bundle/carnival.heic
Binary file not shown.
Binary file added TIPTestsResources.bundle/twitterfied.heic
Binary file not shown.
4 changes: 2 additions & 2 deletions TwitterImagePipeline.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'TwitterImagePipeline'
s.version = '2.11.0'
s.compiler_flags = '-DTIP_PROJECT_VERSION=2.11.0'
s.version = '2.12.0'
s.compiler_flags = '-DTIP_PROJECT_VERSION=2.12.0'
s.summary = 'Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS'
s.description = 'Twitter created a framework for image loading/caching in order to fulfill the numerous needs of Twitter for iOS including being fast, safe, modular and versatile.'
s.homepage = 'https://github.com/twitter/ios-twitter-image-pipeline'
Expand Down
12 changes: 10 additions & 2 deletions TwitterImagePipeline.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
8B5CFE3E1D3820CA00860D40 /* TIPError.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B5CFE3C1D3820CA00860D40 /* TIPError.h */; settings = {ATTRIBUTES = (Public, ); }; };
8B5CFE421D38246500860D40 /* TIPFileUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B5CFE401D38246500860D40 /* TIPFileUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
8B5CFE431D38246500860D40 /* TIPFileUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5CFE411D38246500860D40 /* TIPFileUtils.m */; };
8B62B66D21C313D300A1E4E4 /* twitterfied.heic in Resources */ = {isa = PBXBuildFile; fileRef = 8B62B66C21C313D300A1E4E4 /* twitterfied.heic */; };
8B6301831E68F9B400C9A86A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B6301821E68F9B400C9A86A /* AppDelegate.swift */; };
8B63018C1E68F9B400C9A86A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B63018B1E68F9B400C9A86A /* Assets.xcassets */; };
8B63018F1E68F9B400C9A86A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B63018D1E68F9B400C9A86A /* LaunchScreen.storyboard */; };
Expand Down Expand Up @@ -518,6 +519,7 @@
8B5CFE3C1D3820CA00860D40 /* TIPError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TIPError.h; sourceTree = "<group>"; };
8B5CFE401D38246500860D40 /* TIPFileUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TIPFileUtils.h; sourceTree = "<group>"; };
8B5CFE411D38246500860D40 /* TIPFileUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIPFileUtils.m; sourceTree = "<group>"; };
8B62B66C21C313D300A1E4E4 /* twitterfied.heic */ = {isa = PBXFileReference; lastKnownFileType = file; path = twitterfied.heic; sourceTree = "<group>"; };
8B6301801E68F9B400C9A86A /* TIP Swift Sample App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TIP Swift Sample App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
8B6301821E68F9B400C9A86A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8B63018B1E68F9B400C9A86A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -969,6 +971,7 @@
8B7695091D4824B9009091B5 /* interlace.png */,
8BE31C871B9A1BF5009BC0B2 /* main.m */,
8B76950A1D4824B9009091B5 /* no-interlace.png */,
8B62B66C21C313D300A1E4E4 /* twitterfied.heic */,
8BE31CAE1B9A276F009BC0B2 /* twitterfied.jp2 */,
8BE31CAF1B9A276F009BC0B2 /* twitterfied.jpg */,
8BE31CB01B9A276F009BC0B2 /* twitterfied.pjpg */,
Expand Down Expand Up @@ -1639,6 +1642,7 @@
files = (
8B7695131D482A3A009091B5 /* interlace.png in Resources */,
8BAD1A271BBAFC44003395F3 /* twitterfied.RPCL.jp2 in Resources */,
8B62B66D21C313D300A1E4E4 /* twitterfied.heic in Resources */,
8B3B079B1DFE56B800174F40 /* twitterfied.tiff in Resources */,
8B3B079D1DFE59EE00174F40 /* fireworks_original.gif in Resources */,
8BE31CB31B9A276F009BC0B2 /* twitterfied.pjpg in Resources */,
Expand Down Expand Up @@ -2071,6 +2075,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "";
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -2097,6 +2102,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
Expand All @@ -2119,6 +2125,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CODE_SIGN_IDENTITY = "";
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -2147,6 +2154,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -2419,7 +2427,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2.11;
CURRENT_PROJECT_VERSION = 2.12;
DEAD_CODE_STRIPPING = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
Expand Down Expand Up @@ -2490,7 +2498,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.11;
CURRENT_PROJECT_VERSION = 2.12;
DEAD_CODE_STRIPPING = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
Expand Down
7 changes: 6 additions & 1 deletion TwitterImagePipeline/Project/TIPDefaultImageCodecs.m
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,15 @@ + (nullable instancetype)codecWithImageType:(NSString *)imageType
} else {
TIPAssert(nil == decoder);
}
TIPAssert(nil == encoder);
#else
TIPAssert(nil == decoder);
#endif
TIPAssert(nil == encoder);
#endif
} else if ([imageType isEqualToString:TIPImageTypeHEIC]) {
// it's a crapshoot when the encoder/decoder are present or not
} else if ([imageType isEqualToString:TIPImageTypeAVCI]) {
// it's a crapshoot when the encoder/decoder are present or not
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions TwitterImagePipeline/Project/TIP_Project.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ FOUNDATION_EXTERN NSString *TIPVersion(void);

#pragma mark - Helpers

NS_INLINE BOOL tip_never(void)
{
return NO;
}

FOUNDATION_EXTERN BOOL TIPImageTypeSupportsLossyQuality(NSString * __nullable type);

FOUNDATION_EXTERN void TIPSwizzle(Class cls, SEL originalSelector, SEL swizzledSelector);
Expand Down
8 changes: 4 additions & 4 deletions TwitterImagePipeline/TIPGlobalConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ NS_ASSUME_NONNULL_BEGIN

/**
Default max bytes for rendered caches.
Resolves to being the greater of `System RAM / 12` or `64 MBs`
Resolves to being the lesser of `System RAM / 12` or `160 MBs`
*/
FOUNDATION_EXTERN SInt64 const TIPMaxBytesForAllRenderedCachesDefault;
/**
Default max bytes for memory caches.
Resolves to being the greater of `System RAM / 12` or `64 MBs`
Resolves to being the lesser of `System RAM / 12` or `160 MBs`
*/
FOUNDATION_EXTERN SInt64 const TIPMaxBytesForAllMemoryCachesDefault;
//! Default max bytes for disk caches. `128 MBs`
Expand All @@ -30,9 +30,9 @@ FOUNDATION_EXTERN NSInteger const TIPMaxConcurrentImagePipelineDownloadCountDefa
//! Default maximum size of a cache entry by ratio to the cache max size. `1:6` - `1/6th` the size
FOUNDATION_EXTERN NSUInteger const TIPMaxRatioSizeOfCacheEntryDefault;

//! Default max count for all memory caches to hold. `INT16_MAX >> 6` (511)
//! Default max count for all memory caches to hold. `INT16_MAX >> 7` (255)
FOUNDATION_EXTERN SInt16 const TIPMaxCountForAllMemoryCachesDefault;
//! Default max count for all rendered caches to hold. `INT16_MAX >> 6` (511)
//! Default max count for all rendered caches to hold. `INT16_MAX >> 7` (255)
FOUNDATION_EXTERN SInt16 const TIPMaxCountForAllRenderedCachesDefault;
//! Default max count for all disk caches to hold. `INT16_MAX >> 4` (2044)
FOUNDATION_EXTERN SInt16 const TIPMaxCountForAllDiskCachesDefault;
Expand Down
12 changes: 6 additions & 6 deletions TwitterImagePipeline/TIPGlobalConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
SInt64 const TIPMaxBytesForAllRenderedCachesDefault = -1;
SInt64 const TIPMaxBytesForAllMemoryCachesDefault = -1;
SInt64 const TIPMaxBytesForAllDiskCachesDefault = -1;
SInt16 const TIPMaxCountForAllMemoryCachesDefault = INT16_MAX >> 6;
SInt16 const TIPMaxCountForAllRenderedCachesDefault = INT16_MAX >> 6;
SInt16 const TIPMaxCountForAllMemoryCachesDefault = INT16_MAX >> 7;
SInt16 const TIPMaxCountForAllRenderedCachesDefault = INT16_MAX >> 7;
SInt16 const TIPMaxCountForAllDiskCachesDefault = INT16_MAX >> 4;
NSInteger const TIPMaxConcurrentImagePipelineDownloadCountDefault = 4;
NSUInteger const TIPMaxRatioSizeOfCacheEntryDefault = 6;

// Arbitrarily cap the default max memory bytes at 64MB for Rendered and Memory caches
#define MAX_MEMORY_BYTES_CAP (64ull * 1024ull * 1024ull)
// Arbitrarily default the max bytes for in memory caching to 1/12th the devices RAM (1/6th if you consider rendered cache cap plus memory cache cap)
// Cap the default max memory bytes at 160MB for Rendered and Memory caches -- large enough for cache size / TIPMaxRatioSizeOfCacheEntryDefault to be large enough for full screen images on iPhone XS Max (2688x1242) or iPad Pro 12.9 (2732x2048)
#define MAX_MEMORY_BYTES_CAP (160ull * 1024ull * 1024ull)
// Default the max bytes for in memory caching to 1/12th the devices RAM (1/6th if you consider rendered cache cap plus memory cache cap)
#define MAX_MEMORY_BYTES_DIVISOR (12ull)
// Arbitrarily default the max bytes for on disk caching
// Arbitrarily default the max bytes for on disk caching to 128MBs (roughly 64 large images or 1,600 small images or 32,000 73x73 avatars)
#define MAX_DISK_BYTES (128ull * 1024ull * 1024ull)

static pthread_mutex_t sUITraitCollectionMutex = PTHREAD_MUTEX_INITIALIZER;
Expand Down
4 changes: 3 additions & 1 deletion TwitterImagePipeline/TIPImageCodecCatalogue.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ @implementation TIPImageCodecCatalogue
TIPImageTypeQTIF,
TIPImageTypeICNS,
TIPImageTypeICO,
TIPImageTypeRAW
TIPImageTypeRAW,
TIPImageTypeHEIC,
TIPImageTypeAVCI,
];
for (NSString *imageType in knownImageTypes) {
id<TIPImageCodec> codec = [TIPBasicCGImageSourceCodec codecWithImageType:imageType];
Expand Down
4 changes: 2 additions & 2 deletions TwitterImagePipeline/TIPImageFetchRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ NS_INLINE NSString *TIPImageFetchRequestGetImageIdentifier(id<TIPImageFetchReque
- (instancetype)initWithImageURL:(NSURL *)imageURL
identifier:(nullable NSString *)imageIdentifier
targetDimensions:(CGSize)dims
targetContentMode:(UIViewContentMode)mode;
- (instancetype)initWithImageURL:(NSURL *)imageURL NS_DESIGNATED_INITIALIZER;
targetContentMode:(UIViewContentMode)mode NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithImageURL:(NSURL *)imageURL;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

Expand Down
15 changes: 6 additions & 9 deletions TwitterImagePipeline/TIPImageFetchRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,22 @@ @implementation TIPGenericImageFetchRequest

- (instancetype)initWithImageURL:(NSURL *)imageURL
{
if (self = [super init]) {
_imageURL = imageURL;
_targetContentMode = UIViewContentModeCenter;
_timeToLive = TIPTimeToLiveDefault;
_options = TIPImageFetchNoOptions;
_loadingSources = TIPImageFetchLoadingSourcesAll;
}
return self;
return [self initWithImageURL:imageURL identifier:nil targetDimensions:CGSizeZero targetContentMode:UIViewContentModeCenter];
}

- (instancetype)initWithImageURL:(NSURL *)imageURL
identifier:(nullable NSString *)imageIdentifier
targetDimensions:(CGSize)dims
targetContentMode:(UIViewContentMode)mode
{
if (self = [self initWithImageURL:imageURL]) {
if (self = [super init]) {
_imageURL = imageURL;
_imageIdentifier = [imageIdentifier copy];
_targetDimensions = dims;
_targetContentMode = mode;
_timeToLive = TIPTimeToLiveDefault;
_options = TIPImageFetchNoOptions;
_loadingSources = TIPImageFetchLoadingSourcesAll;
}
return self;
}
Expand Down
13 changes: 13 additions & 0 deletions TwitterImagePipeline/TIPImageTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ FOUNDATION_EXTERN NSString * const TIPImageTypeBMP;
TARGA or TGA (Truevision Advanced Raster Graphics Adapter)
*/
FOUNDATION_EXTERN NSString * const TIPImageTypeTARGA;
/**
HEIC (High Efficiency Image File w/ HEVC compressed image)
HEIC is a specific variant of HEIF
@note Supported on devices with iOS 11+ and Simulators with iOS 12+.
*/
FOUNDATION_EXTERN NSString * const TIPImageTypeHEIC;

#pragma mark Read-only image types

Expand All @@ -79,6 +85,13 @@ FOUNDATION_EXTERN NSString * const TIPImageTypeRAW;
@note requires iOS 11+
*/
FOUNDATION_EXTERN NSString * const TIPImageTypeICNS;
/**
AVCI (High Efficiency Image File w/ H.264 compressed image)
AVCI is a specific variant of HEIF
@note Supported on devices with iOS 11+ and Simulator with iOS 12+.
@warning this is untested currently due to difficulty in creating .avci files to test
*/
FOUNDATION_EXTERN NSString * const TIPImageTypeAVCI;

#pragma mark Unsupported image types (cannot read nor write)

Expand Down
10 changes: 9 additions & 1 deletion TwitterImagePipeline/TIPImageTypes.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
NSString * const TIPImageTypeICNS = @"com.apple.icns";
NSString * const TIPImageTypeICO = @"com.microsoft.ico";
NSString * const TIPImageTypeRAW = @"public.camera-raw-image";
NSString * const TIPImageTypeHEIC = @"public.heic";
NSString * const TIPImageTypeAVCI = @"public.avci";

#pragma mark - Static Functions

Expand Down Expand Up @@ -123,7 +125,9 @@ static BOOL TIPImageTypeHasProgressiveVariant(NSString * __nullable type)
BOOL TIPImageTypeSupportsLossyQuality(NSString * __nullable type)
{
const BOOL hasLossy = [type isEqualToString:TIPImageTypeJPEG]
|| [type isEqualToString:TIPImageTypeJPEG2000];
|| [type isEqualToString:TIPImageTypeJPEG2000]
|| [type isEqualToString:TIPImageTypeHEIC]
|| [type isEqualToString:TIPImageTypeAVCI];

// though GIF can be munged many ways to change the quality,
// we'll keep it simple and not treat GIF as supporting lossy quality
Expand Down Expand Up @@ -173,6 +177,10 @@ BOOL TIPImageTypeSupportsLossyQuality(NSString * __nullable type)
return TIPImageTypeICNS;
} else if (UTTypeConformsTo(imageType, kUTTypeQuickTimeImage)) {
return TIPImageTypeQTIF;
} else if (UTTypeConformsTo(imageType, CFSTR("public.heic"))) {
return TIPImageTypeHEIC;
} else if (UTTypeConformsTo(imageType, CFSTR("public.avci"))) {
return TIPImageTypeAVCI;
}

return nil;
Expand Down
4 changes: 0 additions & 4 deletions TwitterImagePipeline/TIPImageViewFetchHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ typedef NS_ENUM(NSInteger, TIPImageViewDisappearanceBehavior)
/** call when view is laying out subviews */
- (void)triggerViewLayingOutSubviews NS_REQUIRES_SUPER;

/** call when view's hidden property changes */
- (void)triggerViewWillChangeHidden NS_REQUIRES_SUPER;
/** call when view's hidden property changes */
- (void)triggerViewDidChangeHidden NS_REQUIRES_SUPER;
/** call when view will move to window _newWindow_ (can be `nil` when removed from all windows) */
- (void)triggerViewWillMoveToWindow:(nullable UIWindow *)newWindow NS_REQUIRES_SUPER;
/** call when view did move to window (or `nil`) */
Expand Down
25 changes: 0 additions & 25 deletions TwitterImagePipeline/TIPImageViewFetchHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -333,31 +333,6 @@ + (void)transitionView:(UIView<TIPImageFetchable> *)fetchableView
fromHelper.fetchView = nil;
}


- (void)triggerViewWillChangeHidden
{
UIView *view = self.fetchView;
if (view.window != nil) {
if (view.isHidden) {
[self triggerViewWillAppear];
} else {
[self triggerViewWillDisappear];
}
}
}

- (void)triggerViewDidChangeHidden
{
UIView *view = self.fetchView;
if (view.window != nil) {
if (view.isHidden) {
[self triggerViewDidDisappear];
} else {
[self triggerViewDidAppear];
}
}
}

- (void)triggerViewWillMoveToWindow:(nullable UIWindow *)newWindow
{
UIView *imageView = self.fetchView;
Expand Down
5 changes: 4 additions & 1 deletion TwitterImagePipeline/UIImage+TIPAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ NS_ASSUME_NONNULL_BEGIN
@param maskImage The image to mask the output image with, or `nil` to have no mask
@return an image with each opted in effect applied
*/
- (nullable UIImage *)tip_imageWithBlurWithRadius:(CGFloat)blurRadius tintColor:(nullable UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(nullable UIImage *)maskImage;
- (nullable UIImage *)tip_imageWithBlurWithRadius:(CGFloat)blurRadius
tintColor:(nullable UIColor *)tintColor
saturationDeltaFactor:(CGFloat)saturationDeltaFactor
maskImage:(nullable UIImage *)maskImage;

#pragma mark Decode Methods

Expand Down
Loading

0 comments on commit 8b3eff1

Please sign in to comment.