Skip to content

Commit 8b3eff1

Browse files
authored
Update to v2.12.0 (#40)
* 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.)
1 parent ebcca85 commit 8b3eff1

25 files changed

+289
-70
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: objective-c
2-
osx_image: xcode10
2+
osx_image: xcode10.1
33
script:
44
./build.sh

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,27 @@
22

33
## Info
44

5-
**Document version:** 2.11.0
5+
**Document version:** 2.12.0
66

7-
**Last updated:** 09/03/2018
7+
**Last updated:** 12/18/2018
88

99
**Author:** Nolan O'Brien
1010

1111
## History
1212

13+
### 2.12.0
14+
15+
- Add `TIPImageTypeHEIC` and `TIPImageTypeAVCI` support
16+
- There are OS version limitations, see `TIPImageTypes.h` for details
17+
18+
### 2.11.1
19+
20+
- Update defaults in `TIPGlobalConfiguration` for cache sizes
21+
- `TIPMaxBytesForAllRenderedCachesDefault` and `TIPMaxBytesForAllMemoryCachesDefault`
22+
- the lesser of `System RAM / 12` or `160 MBs`
23+
- `TIPMaxCountForAllRenderedCachesDefault` and `TIPMaxCountForAllMemoryCachesDefault`
24+
- default cap to `255` instead of `511`
25+
1326
### 2.11.0
1427

1528
- add support for animated images with `TIPImageViewFetchHelper` by supporting `TIPImageContainer` as well as `UIImage`

ImageSpeedComparison/ViewController.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
{ @"public.tiff", "TIFF", "twitterfied.tiff", NO, NO },
3030
{ @"com.compuserve.gif", "GIF", "fireworks_original.gif", NO, YES },
3131
{ @"com.google.webp", "WEBP", "twitterfied.webp", NO, NO },
32+
{ @"public.heic", "HEIC", "twitterfied.heic", NO, NO },
3233
{ @"public.jpeg", "Small-PJPEG", "twitterfied.small.pjpg", YES, NO },
3334
};
3435

@@ -391,8 +392,8 @@ - (NSString *)tip_transformerIdentifier
391392

392393
//- (NSDictionary *)progressiveLoadingPolicies
393394
//{
394-
// if ([sImageTypes[_imageTypeIndex].type isEqualToString:TIPImageTypeJPEG2000] || [sImageTypes[_imageTypeIndex].type isEqualToString:TIPImageTypePNG]) {
395-
// if (sImageTypes[_imageTypeIndex].isProgressive) {
395+
// if (sImageTypes[_imageTypeIndex].isProgressive) {
396+
// if (![sImageTypes[_imageTypeIndex].type isEqualToString:TIPImageTypeJPEG]) {
396397
// return @{ sImageTypes[_imageTypeIndex].type : [[TIPGreedyProgressiveLoadingPolicy alloc] init] };
397398
// }
398399
// }

ImageSpeedComparison/twitterfied.heic

103 KB
Binary file not shown.
1.58 MB
Binary file not shown.
103 KB
Binary file not shown.

TwitterImagePipeline.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = 'TwitterImagePipeline'
3-
s.version = '2.11.0'
4-
s.compiler_flags = '-DTIP_PROJECT_VERSION=2.11.0'
3+
s.version = '2.12.0'
4+
s.compiler_flags = '-DTIP_PROJECT_VERSION=2.12.0'
55
s.summary = 'Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS'
66
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.'
77
s.homepage = 'https://github.com/twitter/ios-twitter-image-pipeline'

TwitterImagePipeline.xcodeproj/project.pbxproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
8B5CFE3E1D3820CA00860D40 /* TIPError.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B5CFE3C1D3820CA00860D40 /* TIPError.h */; settings = {ATTRIBUTES = (Public, ); }; };
8282
8B5CFE421D38246500860D40 /* TIPFileUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B5CFE401D38246500860D40 /* TIPFileUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
8383
8B5CFE431D38246500860D40 /* TIPFileUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5CFE411D38246500860D40 /* TIPFileUtils.m */; };
84+
8B62B66D21C313D300A1E4E4 /* twitterfied.heic in Resources */ = {isa = PBXBuildFile; fileRef = 8B62B66C21C313D300A1E4E4 /* twitterfied.heic */; };
8485
8B6301831E68F9B400C9A86A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B6301821E68F9B400C9A86A /* AppDelegate.swift */; };
8586
8B63018C1E68F9B400C9A86A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B63018B1E68F9B400C9A86A /* Assets.xcassets */; };
8687
8B63018F1E68F9B400C9A86A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B63018D1E68F9B400C9A86A /* LaunchScreen.storyboard */; };
@@ -518,6 +519,7 @@
518519
8B5CFE3C1D3820CA00860D40 /* TIPError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TIPError.h; sourceTree = "<group>"; };
519520
8B5CFE401D38246500860D40 /* TIPFileUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TIPFileUtils.h; sourceTree = "<group>"; };
520521
8B5CFE411D38246500860D40 /* TIPFileUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIPFileUtils.m; sourceTree = "<group>"; };
522+
8B62B66C21C313D300A1E4E4 /* twitterfied.heic */ = {isa = PBXFileReference; lastKnownFileType = file; path = twitterfied.heic; sourceTree = "<group>"; };
521523
8B6301801E68F9B400C9A86A /* TIP Swift Sample App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TIP Swift Sample App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
522524
8B6301821E68F9B400C9A86A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
523525
8B63018B1E68F9B400C9A86A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -969,6 +971,7 @@
969971
8B7695091D4824B9009091B5 /* interlace.png */,
970972
8BE31C871B9A1BF5009BC0B2 /* main.m */,
971973
8B76950A1D4824B9009091B5 /* no-interlace.png */,
974+
8B62B66C21C313D300A1E4E4 /* twitterfied.heic */,
972975
8BE31CAE1B9A276F009BC0B2 /* twitterfied.jp2 */,
973976
8BE31CAF1B9A276F009BC0B2 /* twitterfied.jpg */,
974977
8BE31CB01B9A276F009BC0B2 /* twitterfied.pjpg */,
@@ -1639,6 +1642,7 @@
16391642
files = (
16401643
8B7695131D482A3A009091B5 /* interlace.png in Resources */,
16411644
8BAD1A271BBAFC44003395F3 /* twitterfied.RPCL.jp2 in Resources */,
1645+
8B62B66D21C313D300A1E4E4 /* twitterfied.heic in Resources */,
16421646
8B3B079B1DFE56B800174F40 /* twitterfied.tiff in Resources */,
16431647
8B3B079D1DFE59EE00174F40 /* fireworks_original.gif in Resources */,
16441648
8BE31CB31B9A276F009BC0B2 /* twitterfied.pjpg in Resources */,
@@ -2071,6 +2075,7 @@
20712075
CLANG_CXX_LIBRARY = "libc++";
20722076
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
20732077
CLANG_WARN_SUSPICIOUS_MOVES = YES;
2078+
CODE_SIGN_IDENTITY = "";
20742079
DEBUG_INFORMATION_FORMAT = dwarf;
20752080
DEFINES_MODULE = YES;
20762081
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -2097,6 +2102,7 @@
20972102
CLANG_CXX_LIBRARY = "libc++";
20982103
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
20992104
CLANG_WARN_SUSPICIOUS_MOVES = YES;
2105+
CODE_SIGN_IDENTITY = "";
21002106
COPY_PHASE_STRIP = NO;
21012107
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
21022108
DEFINES_MODULE = YES;
@@ -2119,6 +2125,7 @@
21192125
isa = XCBuildConfiguration;
21202126
buildSettings = {
21212127
CLANG_ANALYZER_NONNULL = YES;
2128+
CODE_SIGN_IDENTITY = "";
21222129
DEBUG_INFORMATION_FORMAT = dwarf;
21232130
DEFINES_MODULE = YES;
21242131
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -2147,6 +2154,7 @@
21472154
isa = XCBuildConfiguration;
21482155
buildSettings = {
21492156
CLANG_ANALYZER_NONNULL = YES;
2157+
CODE_SIGN_IDENTITY = "";
21502158
COPY_PHASE_STRIP = NO;
21512159
DEBUG_INFORMATION_FORMAT = dwarf;
21522160
DEFINES_MODULE = YES;
@@ -2419,7 +2427,7 @@
24192427
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24202428
CODE_SIGN_STYLE = Manual;
24212429
COPY_PHASE_STRIP = NO;
2422-
CURRENT_PROJECT_VERSION = 2.11;
2430+
CURRENT_PROJECT_VERSION = 2.12;
24232431
DEAD_CODE_STRIPPING = NO;
24242432
DYLIB_COMPATIBILITY_VERSION = 1;
24252433
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
@@ -2490,7 +2498,7 @@
24902498
CLANG_WARN_UNREACHABLE_CODE = YES;
24912499
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24922500
CODE_SIGN_STYLE = Manual;
2493-
CURRENT_PROJECT_VERSION = 2.11;
2501+
CURRENT_PROJECT_VERSION = 2.12;
24942502
DEAD_CODE_STRIPPING = NO;
24952503
DYLIB_COMPATIBILITY_VERSION = 1;
24962504
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";

TwitterImagePipeline/Project/TIPDefaultImageCodecs.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,15 @@ + (nullable instancetype)codecWithImageType:(NSString *)imageType
147147
} else {
148148
TIPAssert(nil == decoder);
149149
}
150+
TIPAssert(nil == encoder);
150151
#else
151152
TIPAssert(nil == decoder);
152-
#endif
153153
TIPAssert(nil == encoder);
154+
#endif
155+
} else if ([imageType isEqualToString:TIPImageTypeHEIC]) {
156+
// it's a crapshoot when the encoder/decoder are present or not
157+
} else if ([imageType isEqualToString:TIPImageTypeAVCI]) {
158+
// it's a crapshoot when the encoder/decoder are present or not
154159
}
155160
}
156161
}

TwitterImagePipeline/Project/TIP_Project.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ FOUNDATION_EXTERN NSString *TIPVersion(void);
2323

2424
#pragma mark - Helpers
2525

26+
NS_INLINE BOOL tip_never(void)
27+
{
28+
return NO;
29+
}
30+
2631
FOUNDATION_EXTERN BOOL TIPImageTypeSupportsLossyQuality(NSString * __nullable type);
2732

2833
FOUNDATION_EXTERN void TIPSwizzle(Class cls, SEL originalSelector, SEL swizzledSelector);

TwitterImagePipeline/TIPGlobalConfiguration.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ NS_ASSUME_NONNULL_BEGIN
1515

1616
/**
1717
Default max bytes for rendered caches.
18-
Resolves to being the greater of `System RAM / 12` or `64 MBs`
18+
Resolves to being the lesser of `System RAM / 12` or `160 MBs`
1919
*/
2020
FOUNDATION_EXTERN SInt64 const TIPMaxBytesForAllRenderedCachesDefault;
2121
/**
2222
Default max bytes for memory caches.
23-
Resolves to being the greater of `System RAM / 12` or `64 MBs`
23+
Resolves to being the lesser of `System RAM / 12` or `160 MBs`
2424
*/
2525
FOUNDATION_EXTERN SInt64 const TIPMaxBytesForAllMemoryCachesDefault;
2626
//! Default max bytes for disk caches. `128 MBs`
@@ -30,9 +30,9 @@ FOUNDATION_EXTERN NSInteger const TIPMaxConcurrentImagePipelineDownloadCountDefa
3030
//! Default maximum size of a cache entry by ratio to the cache max size. `1:6` - `1/6th` the size
3131
FOUNDATION_EXTERN NSUInteger const TIPMaxRatioSizeOfCacheEntryDefault;
3232

33-
//! Default max count for all memory caches to hold. `INT16_MAX >> 6` (511)
33+
//! Default max count for all memory caches to hold. `INT16_MAX >> 7` (255)
3434
FOUNDATION_EXTERN SInt16 const TIPMaxCountForAllMemoryCachesDefault;
35-
//! Default max count for all rendered caches to hold. `INT16_MAX >> 6` (511)
35+
//! Default max count for all rendered caches to hold. `INT16_MAX >> 7` (255)
3636
FOUNDATION_EXTERN SInt16 const TIPMaxCountForAllRenderedCachesDefault;
3737
//! Default max count for all disk caches to hold. `INT16_MAX >> 4` (2044)
3838
FOUNDATION_EXTERN SInt16 const TIPMaxCountForAllDiskCachesDefault;

TwitterImagePipeline/TIPGlobalConfiguration.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
SInt64 const TIPMaxBytesForAllRenderedCachesDefault = -1;
3030
SInt64 const TIPMaxBytesForAllMemoryCachesDefault = -1;
3131
SInt64 const TIPMaxBytesForAllDiskCachesDefault = -1;
32-
SInt16 const TIPMaxCountForAllMemoryCachesDefault = INT16_MAX >> 6;
33-
SInt16 const TIPMaxCountForAllRenderedCachesDefault = INT16_MAX >> 6;
32+
SInt16 const TIPMaxCountForAllMemoryCachesDefault = INT16_MAX >> 7;
33+
SInt16 const TIPMaxCountForAllRenderedCachesDefault = INT16_MAX >> 7;
3434
SInt16 const TIPMaxCountForAllDiskCachesDefault = INT16_MAX >> 4;
3535
NSInteger const TIPMaxConcurrentImagePipelineDownloadCountDefault = 4;
3636
NSUInteger const TIPMaxRatioSizeOfCacheEntryDefault = 6;
3737

38-
// Arbitrarily cap the default max memory bytes at 64MB for Rendered and Memory caches
39-
#define MAX_MEMORY_BYTES_CAP (64ull * 1024ull * 1024ull)
40-
// 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)
38+
// 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)
39+
#define MAX_MEMORY_BYTES_CAP (160ull * 1024ull * 1024ull)
40+
// 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)
4141
#define MAX_MEMORY_BYTES_DIVISOR (12ull)
42-
// Arbitrarily default the max bytes for on disk caching
42+
// 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)
4343
#define MAX_DISK_BYTES (128ull * 1024ull * 1024ull)
4444

4545
static pthread_mutex_t sUITraitCollectionMutex = PTHREAD_MUTEX_INITIALIZER;

TwitterImagePipeline/TIPImageCodecCatalogue.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ @implementation TIPImageCodecCatalogue
3737
TIPImageTypeQTIF,
3838
TIPImageTypeICNS,
3939
TIPImageTypeICO,
40-
TIPImageTypeRAW
40+
TIPImageTypeRAW,
41+
TIPImageTypeHEIC,
42+
TIPImageTypeAVCI,
4143
];
4244
for (NSString *imageType in knownImageTypes) {
4345
id<TIPImageCodec> codec = [TIPBasicCGImageSourceCodec codecWithImageType:imageType];

TwitterImagePipeline/TIPImageFetchRequest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ NS_INLINE NSString *TIPImageFetchRequestGetImageIdentifier(id<TIPImageFetchReque
197197
- (instancetype)initWithImageURL:(NSURL *)imageURL
198198
identifier:(nullable NSString *)imageIdentifier
199199
targetDimensions:(CGSize)dims
200-
targetContentMode:(UIViewContentMode)mode;
201-
- (instancetype)initWithImageURL:(NSURL *)imageURL NS_DESIGNATED_INITIALIZER;
200+
targetContentMode:(UIViewContentMode)mode NS_DESIGNATED_INITIALIZER;
201+
- (instancetype)initWithImageURL:(NSURL *)imageURL;
202202
- (instancetype)init NS_UNAVAILABLE;
203203
+ (instancetype)new NS_UNAVAILABLE;
204204

TwitterImagePipeline/TIPImageFetchRequest.m

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,22 @@ @implementation TIPGenericImageFetchRequest
4040

4141
- (instancetype)initWithImageURL:(NSURL *)imageURL
4242
{
43-
if (self = [super init]) {
44-
_imageURL = imageURL;
45-
_targetContentMode = UIViewContentModeCenter;
46-
_timeToLive = TIPTimeToLiveDefault;
47-
_options = TIPImageFetchNoOptions;
48-
_loadingSources = TIPImageFetchLoadingSourcesAll;
49-
}
50-
return self;
43+
return [self initWithImageURL:imageURL identifier:nil targetDimensions:CGSizeZero targetContentMode:UIViewContentModeCenter];
5144
}
5245

5346
- (instancetype)initWithImageURL:(NSURL *)imageURL
5447
identifier:(nullable NSString *)imageIdentifier
5548
targetDimensions:(CGSize)dims
5649
targetContentMode:(UIViewContentMode)mode
5750
{
58-
if (self = [self initWithImageURL:imageURL]) {
51+
if (self = [super init]) {
52+
_imageURL = imageURL;
5953
_imageIdentifier = [imageIdentifier copy];
6054
_targetDimensions = dims;
6155
_targetContentMode = mode;
56+
_timeToLive = TIPTimeToLiveDefault;
57+
_options = TIPImageFetchNoOptions;
58+
_loadingSources = TIPImageFetchLoadingSourcesAll;
6259
}
6360
return self;
6461
}

TwitterImagePipeline/TIPImageTypes.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ FOUNDATION_EXTERN NSString * const TIPImageTypeBMP;
5656
TARGA or TGA (Truevision Advanced Raster Graphics Adapter)
5757
*/
5858
FOUNDATION_EXTERN NSString * const TIPImageTypeTARGA;
59+
/**
60+
HEIC (High Efficiency Image File w/ HEVC compressed image)
61+
HEIC is a specific variant of HEIF
62+
@note Supported on devices with iOS 11+ and Simulators with iOS 12+.
63+
*/
64+
FOUNDATION_EXTERN NSString * const TIPImageTypeHEIC;
5965

6066
#pragma mark Read-only image types
6167

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

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

TwitterImagePipeline/TIPImageTypes.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
NSString * const TIPImageTypeICNS = @"com.apple.icns";
4949
NSString * const TIPImageTypeICO = @"com.microsoft.ico";
5050
NSString * const TIPImageTypeRAW = @"public.camera-raw-image";
51+
NSString * const TIPImageTypeHEIC = @"public.heic";
52+
NSString * const TIPImageTypeAVCI = @"public.avci";
5153

5254
#pragma mark - Static Functions
5355

@@ -123,7 +125,9 @@ static BOOL TIPImageTypeHasProgressiveVariant(NSString * __nullable type)
123125
BOOL TIPImageTypeSupportsLossyQuality(NSString * __nullable type)
124126
{
125127
const BOOL hasLossy = [type isEqualToString:TIPImageTypeJPEG]
126-
|| [type isEqualToString:TIPImageTypeJPEG2000];
128+
|| [type isEqualToString:TIPImageTypeJPEG2000]
129+
|| [type isEqualToString:TIPImageTypeHEIC]
130+
|| [type isEqualToString:TIPImageTypeAVCI];
127131

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

178186
return nil;

TwitterImagePipeline/TIPImageViewFetchHelper.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ typedef NS_ENUM(NSInteger, TIPImageViewDisappearanceBehavior)
126126
/** call when view is laying out subviews */
127127
- (void)triggerViewLayingOutSubviews NS_REQUIRES_SUPER;
128128

129-
/** call when view's hidden property changes */
130-
- (void)triggerViewWillChangeHidden NS_REQUIRES_SUPER;
131-
/** call when view's hidden property changes */
132-
- (void)triggerViewDidChangeHidden NS_REQUIRES_SUPER;
133129
/** call when view will move to window _newWindow_ (can be `nil` when removed from all windows) */
134130
- (void)triggerViewWillMoveToWindow:(nullable UIWindow *)newWindow NS_REQUIRES_SUPER;
135131
/** call when view did move to window (or `nil`) */

TwitterImagePipeline/TIPImageViewFetchHelper.m

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -333,31 +333,6 @@ + (void)transitionView:(UIView<TIPImageFetchable> *)fetchableView
333333
fromHelper.fetchView = nil;
334334
}
335335

336-
337-
- (void)triggerViewWillChangeHidden
338-
{
339-
UIView *view = self.fetchView;
340-
if (view.window != nil) {
341-
if (view.isHidden) {
342-
[self triggerViewWillAppear];
343-
} else {
344-
[self triggerViewWillDisappear];
345-
}
346-
}
347-
}
348-
349-
- (void)triggerViewDidChangeHidden
350-
{
351-
UIView *view = self.fetchView;
352-
if (view.window != nil) {
353-
if (view.isHidden) {
354-
[self triggerViewDidDisappear];
355-
} else {
356-
[self triggerViewDidAppear];
357-
}
358-
}
359-
}
360-
361336
- (void)triggerViewWillMoveToWindow:(nullable UIWindow *)newWindow
362337
{
363338
UIView *imageView = self.fetchView;

TwitterImagePipeline/UIImage+TIPAdditions.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ NS_ASSUME_NONNULL_BEGIN
158158
@param maskImage The image to mask the output image with, or `nil` to have no mask
159159
@return an image with each opted in effect applied
160160
*/
161-
- (nullable UIImage *)tip_imageWithBlurWithRadius:(CGFloat)blurRadius tintColor:(nullable UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(nullable UIImage *)maskImage;
161+
- (nullable UIImage *)tip_imageWithBlurWithRadius:(CGFloat)blurRadius
162+
tintColor:(nullable UIColor *)tintColor
163+
saturationDeltaFactor:(CGFloat)saturationDeltaFactor
164+
maskImage:(nullable UIImage *)maskImage;
162165

163166
#pragma mark Decode Methods
164167

0 commit comments

Comments
 (0)