Commit Graph

363 Commits

Author SHA1 Message Date
Garrett Moon
9dd8ebf8da Better clearing of memory mapped files.
First, prevents a memory leak if users reference self in their PINAnimatedImage completions.

Second, this deletes decoded files when there are no more references to an animated image.
Previously we deleted on app open and exit.

I wasn't going to do this in case you closed a GIF and then reopened, but the more I
thought about it the cost is too high: A user can see their disk size balloon if they view
a bunch of GIFs and then check usage. They could also fill up their space enough while using
the app by viewing GIF after GIF that instability could result.
2016-04-11 13:20:58 -07:00
Garrett Moon
e3d2e07ae7 Addressing Rricky's comments 2016-04-08 16:26:04 -07:00
Garrett Moon
5c5c3f4cba Documentation of PINAnimatedImage 2016-04-08 14:39:08 -07:00
Garrett Moon
f10547d1c5 Fix for file cleanup / prevent crash if memoryMap is nil. 2016-04-08 10:55:06 -07:00
Garrett Moon
9e8132cf68 I can't believe it was a typo 2016-04-06 14:48:51 -07:00
Garrett Moon
fc900b66d2 Cross platform fixes 2016-04-06 14:17:51 -07:00
Garrett Moon
5e2d20d36b Beta of PINAnimatedImage 2016-04-05 18:02:09 -07:00
Garrett Moon
54062d96d1 Fix examples and Carthage 2016-04-04 16:24:37 -07:00
Garrett Moon
ea164f9524 Follow up to #175, addressing comments 2016-04-04 16:12:17 -07:00
Garrett Moon
83c8fc687f Merge pull request #175 from pinterest/addSupportForCustomDecode
Add support for custom decode
2016-04-04 16:11:07 -07:00
Garrett Moon
4b5d3b8c7e Cleanup 2016-03-29 17:18:37 -07:00
Garrett Moon
509ee0cd2e UIImage -> PINImage 2016-03-29 16:48:46 -07:00
Garrett Moon
7c31744e31 Switch to alternative representation 2016-03-28 17:08:53 -07:00
Garrett Moon
4fbb5b540c Spacing 2016-03-28 17:06:36 -07:00
Garrett Moon
1d84f5ebc8 Add memory container 2016-03-28 17:05:59 -07:00
Garrett Moon
5007fd2cc5 2.1.2 2.1.2 2016-03-25 08:36:54 -07:00
Garrett Moon
973ae6c906 Merge pull request #172 from ejensen/cleanup
Pedantic corrections
2016-03-25 08:14:42 -07:00
Eric Jensen
270bf97964 Remove unused property 2016-03-22 22:02:57 -07:00
Eric Jensen
af382d93f6 Correct spelling typos 2016-03-22 22:02:27 -07:00
Eric Jensen
153df72ac4 Correct mixed indentation by replacing tabs with spaces 2016-03-22 22:01:35 -07:00
Garrett Moon
b13b3cf25e Merge pull request #170 from kerrmarin/master
Add nullability specifier to PINURLSessionManager delegate
2016-03-22 13:29:12 -07:00
Kerr Marin Miller
dc4c89ed2d Add nullability specifier to PINURLSessionManager delegate 2016-03-22 10:59:15 +00:00
Garrett Moon
7ba1bee59c Merge pull request #167 from pinterest/preventDiskCacheRemoveOnMainThread
Don't want to call diskCache remove synchronously on the main thread.
2016-03-21 11:38:32 -07:00
Garrett Moon
855f2f14b7 2.1.1 2.1.1 2016-03-20 17:52:00 -07:00
Garrett Moon
d8c5795fcd Improved docs 2016-03-20 17:47:25 -07:00
Garrett Moon
633c09e0be Merge branch 'justin-fix/osx-conditionals' 2016-03-18 16:34:15 -07:00
Garrett Moon
176bd61281 Add PINRemoteLock to Carthage project 2016-03-18 16:25:06 -07:00
Garrett Moon
5d4babdc99 Don't want those semi-colons 2016-03-18 16:20:23 -07:00
Garrett Moon
bfb83fd1a6 Merge branch 'fix/osx-conditionals' of https://github.com/justin/PINRemoteImage into justin-fix/osx-conditionals 2016-03-18 16:19:31 -07:00
Justin Williams
4099060dbd Old school #import instead of @import 2016-03-18 16:40:55 -06:00
Garrett Moon
42aa7b6dc5 Don't want to call diskCache remove synchronously on the main thread. 2016-03-18 14:08:28 -07:00
Justin Williams
26243b3618 PIN_TARGET_IOS and PIN_TARGET_MAC macros
Make it easier to differentiate between Mac and iOS / tvOS targets.
2016-03-18 08:35:00 -06:00
Garrett Moon
f110fb58c3 Merge pull request #165 from pinterest/addBetterLocking
Add slightly more performant locking.
2016-03-17 10:38:06 -07:00
Garrett Moon
6d6f4fe264 Add slightly more performant locking. 2016-03-17 10:29:36 -07:00
Justin Williams
fa2fee5c7a Include TargetConditionals in macros file 2016-03-17 08:45:57 -06:00
Justin Williams
0235250a5f More explicit TargetConditional intentions
First we check to see if we are on the iOS or tvOS. If not, then we defer back to OS X.

TARGET_OS_IPHONE is a variant of TARGET_OS_MAC, which makes this whole thing really stupid.
2016-03-17 08:45:57 -06:00
Garrett Moon
29c1735b3c 2.1 release 2.1 2016-03-11 21:06:45 -08:00
Garrett Moon
2214c0e133 Merge pull request #160 from ikesyo/fix-mac-example-and-carthage-support
Fix Example-Mac and Carthage support
2016-03-11 20:50:51 -08:00
Garrett Moon
7b00edd550 Merge pull request #162 from pinterest/addSupportForSynchronouslyGettingImageFromCache
Add support for synchronously getting images from the cache. Also, st…
2016-03-11 20:22:26 -08:00
Garrett Moon
2e3c844c28 UIImage should be PINImage 2016-03-11 16:35:46 -08:00
Garrett Moon
33b37abeea Shouldn't be deprecated :) 2016-03-11 15:52:25 -08:00
Garrett Moon
adef89e8a8 Merge pull request #161 from maicki/DisableImageSourceShouldCache
Set kCGImageSourceShouldCache false by default
2016-03-11 15:43:19 -08:00
Michael Schneider
42c45261da Fix using wrong variable 2016-03-11 15:24:42 -08:00
Garrett Moon
3b5164af98 Add support for synchronously getting images from the cache. Also, store images in cache even if they aren't decoded. 2016-03-11 15:17:30 -08:00
Michael Schneider
f6ae01a2b0 Set kCGImageSourceShouldCache false by default 2016-03-11 14:49:06 -08:00
Syo Ikeda
9109ff5a5f Fix Example-Mac and Carthage support
There is an invalid `Pods-PINRemoteImage-PINRemoteImage.xcscheme` scheme which does not have corresponding build target.
2016-03-12 00:05:23 +09:00
Garrett Moon
75a485e75d Merge pull request #131 from ioveracker/tvos
Added support for tvOS
2016-03-09 20:44:32 -08:00
Isaac Overacker
d492b7c3da Added tvOS subspec, tvOS example cleanup.
- tvOS subspec excludes FLAnimatedImage (for now)
- Removed GIF and WebP examples
- Added Pods directory
2016-03-09 20:16:37 -08:00
Isaac Overacker
b563875a3a Added tvOS example 2016-03-09 20:16:36 -08:00
Isaac Overacker
dfe601aef0 Added tvOS deployment target to podspec. 2016-03-09 20:16:36 -08:00