Commit Graph

172 Commits

Author SHA1 Message Date
Garrett Moon
d8c5795fcd Improved docs 2016-03-20 17:47:25 -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
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
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
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
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
Garrett Moon
231ccb1b21 PIN_APP_EXTENSIONS is no longer necessary. 2016-03-05 15:28:13 -08:00
Garrett Moon
cf7a88fe20 Added comments 2016-02-23 11:11:13 -08:00
Garrett Moon
dea281bed6 All access to callback should be done outside async 2016-02-23 11:09:53 -08:00
Garrett Moon
29b0b4ac65 Fixes a crash in task callbacks
While all methods on tasks are called within the manager's lock,
dispatching to another queue obviously means the manager may not
be locked anymore.

I also moved calling progress download callbacks to the download
task so it's similar to progress image.

Hopefully these issues have been fixed, but it leads me to believe
a better architecture would be to make the tasks immutable by the
manager and have the tasks manage a lock on themselves. I'll need
to think about that more.
2016-02-23 11:01:56 -08:00
Garrett Moon
06485660d2 Fix warning due to int conversion 2016-02-17 16:00:41 -08:00
Garrett Moon
d23487c57e That would have been bad. 2016-02-17 13:43:01 -08:00
Garrett Moon
5f609a7cde Remove load and instead make supportsQOS method. Thanks @appleguy! 2016-02-17 13:43:01 -08:00
Garrett Moon
ed5fa6af52 We only need to check respondsToSelector once and set QOS on queue, not each operation. 2016-02-17 13:43:01 -08:00
Garrett Moon
b57161ddcb Callback on callback queue 2016-02-10 18:20:55 -08:00
Garrett Moon
ae91afe047 Merge branch 'feature/add-download-progress' of https://github.com/maicki/PINRemoteImage into maicki-feature/add-download-progress 2016-02-10 18:16:45 -08:00
Michael Schneider
c2a5f4220b Call PINRemoteImageDownloadTask callback blocks outside the PINRemoteImageManager lock
We call the callback blocks outside the lock that way blocking the callback won't lock up PINRemoteImageManager.
2016-02-10 14:36:25 -08:00
Michael Schneider
07b779eb4b Rename PINRemoteImageManagerDownloadProgress to PINRemoteImageManagerProgressDownload 2016-02-10 14:23:57 -08:00
Michael Schneider
5d5dada353 Rename downloadProgress: to progressDownload: 2016-02-10 14:13:56 -08:00
Michael Schneider
e2f8f67c1d Change progress block name to progressImage 2016-02-10 13:54:00 -08:00
Garrett Moon
dd3738bc4a Priority is only available on iOS 8 and above. 2016-02-09 15:31:18 -08:00
Michael Schneider
da255a576c Add optional block to track download progress of image 2016-02-08 20:28:29 -08:00
Garrett Moon
ec0fa5b85a Remove deprecated methods in preperation for 2.0 2016-02-08 17:02:30 -08:00
Adlai Holler
0ef39a8b7f Make WebP + CocoaPods + use_frameworks! work again 2016-02-05 15:35:09 -08:00
Garrett Moon
ff59acafa4 Allow setting of progress block to add or cancel updates 2016-02-03 12:59:44 -08:00
Garrett Moon
997c747bf1 Merge branch 'add-generics-for-image-url-arrays' of https://github.com/rounak/PINRemoteImage into rounak-add-generics-for-image-url-arrays 2016-02-02 14:28:00 -08:00
rounak
6a90410322 Add generics to collections 2016-02-01 22:19:51 -08:00
Michael Schneider
f18c250f3e Merge branch 'master' into feature/osx-support 2016-01-30 16:33:15 -08:00
Garrett Moon
1c17ece5e6 missed nullability specifier 2016-01-25 14:29:43 -08:00
Garrett Moon
bcb0bd9fc2 Allow maximum progressive render size to be set 2016-01-25 10:53:29 -08:00
Garrett Moon
f8671046d0 Return if radius will be less than FLT_EPSILON 2016-01-25 10:31:07 -08:00
Garrett Moon
1ee0d2563a cleanup 2016-01-25 10:31:07 -08:00
Garrett Moon
38436d021a Remove unneeded notification removal 2016-01-25 10:31:07 -08:00
Garrett Moon
c98d5626f2 Switch to Accelerate for blurring
Core Image crashes were still showing up in our stack traces
even after many speculative fixes. Lets see if accelerate does
better.
2016-01-25 10:31:07 -08:00
Garrett Moon
873e26a183 Allow blurring of progressive to be disabled 2016-01-22 14:14:17 -08:00
Garrett Moon
561251adb9 After continually seeing crashes on createCGImage:fromRect: I'm ready
to try some speculative fixes. This moves the rendering to a serial queue
A bit disappointing, this will be reverted if it doesn't address the crashes.

If it does… well, we'll have more to work on.
2016-01-19 12:38:37 -08:00
Garrett Moon
971049b47a Merge pull request #101 from mRs-/better-swift-support
Better swift support for optionals
2016-01-15 11:40:02 -08:00
Marius Landwehr
3e385dc0c9 switched nonnull to nullable on pin_setDownloadImageOperation for NSUUID and for the deprecated method 2016-01-15 07:33:41 +01:00
Marius Landwehr
bd9006d86e rework on PINURLSessionManager 2016-01-12 21:46:54 +01:00
Marius Landwehr
d283377b0d added better swift support for deprecated methods 2016-01-12 21:46:44 +01:00
Michael Schneider
cd20716750 Fix using NSGraphicsContext in creating a CGImage in NSImage category 2016-01-06 14:58:34 +01:00
Michael Schneider
8df9dc00c6 Add support for OS X to library
Mapping generic classes like PINImage, PINImageView and PINButton to the equivalent UIKit or AppKit classes. Throughout the framework use these mappings instead of the concrete UIKit / AppKit names. Furthermore we provide a category on NSImage that is adding methods that are not available on NSImage but on UIImage.
2016-01-04 17:39:50 +01:00