Philippe Converset
1fc909e9db
Allow nested call to setImageWithURLRequest
...
Calling [UIImageView setImageWithURL:] inside [UIImageView setImageWithURLRequest:placeholderImage:success:failure] completion block could NOT work.
This was due to internal af_imageRequestOperation set to nil AFTER a completion block is called. With this fix, it is now set to nil BEFORE.
2013-07-31 11:25:55 +02:00
Mattt Thompson
0c3a4ea712
[Issue #1115 ] Only set placeholder image if not nil
2013-07-05 11:38:37 -05:00
Konstantinos Vaggelakos
29c87a3c92
UIImageView+AFNetworking not using setHTTPShouldHandleCookies
...
Signed-off-by: Mattt Thompson <m@mattt.me>
2013-03-14 12:56:38 -07:00
Sean Kovacs
b42ea1fdb6
[Issue #803 ] Only set image in UIImageView category if non-nil
...
Signed-off-by: Mattt Thompson <m@mattt.me>
2013-02-27 11:11:49 -08:00
Cédric Luthi
4b17ec6b51
Compare NSURLRequest rather than NSURL
...
If you inadvertently load a nil URL in UIImageView+AFNetworking, the failure block of the image request operation is bypassed because [nil isEqual:nil] == NO. By comparing the URL request instead of the URL, the `isEqual:` test passes and the error is properly forwarded to the failure block parameter.
2013-02-01 12:23:26 +01:00
Mattt Thompson
0f794ccfc9
[Issue #769 ] Resolving asymmetry in cached image case for UIImageView category
2013-01-31 06:54:45 +00:00
Mattt Thompson
d9da9e5c1a
Whitespace formatting
2013-01-26 10:31:16 -05:00
Peyman
b337828e96
Fix race condition in UIImageView+AFNetworking
2013-01-21 14:11:26 -08:00
Oliver Jones
d8b4dcb349
Fixes warning: 'macro' is not defined, evaluates to 0
2012-11-30 17:59:50 +11:00
Mattt Thompson
81f33ae971
[Issue #592 ][Issue #600 ] Changes the logic of UIImageView -setImageWithURLRequest:placeholderImage:success:failure: such that if the success block is specified, the default behavior of self.image = image is not executed. This allows for full customization over any post-processing on the image, or the animation to be used when setting the image.
2012-10-31 08:20:58 -07:00
Mattt Thompson
ebc9f7d50e
Removing excess whitespace
2012-10-31 08:07:49 -07:00
Mattt Thompson
e8b3e27043
Replacing existing property ownership values of retain with strong
2012-10-09 09:26:50 -07:00
Mattt Thompson
fc16eef8b2
Disabling HTTP pipelining for image request operations
2012-09-25 21:48:25 -07:00
Mattt Thompson
ff37bb59f8
Merge branch 'master' into 1.0RC2
...
Conflicts:
AFNetworking/AFHTTPClient.m
AFNetworking/AFHTTPRequestOperation.m
AFNetworking/AFJSONRequestOperation.m
AFNetworking/AFNetworkActivityIndicatorManager.m
AFNetworking/AFURLConnectionOperation.h
2012-09-14 10:30:25 -07:00
Mattt Thompson
70dff01807
Using dispatch_once pattern for initializing UIImageView request operation queue singleton
...
Initializing operation queue with NSOperationQueueDefaultMaxConcurrentOperationCount
2012-08-31 16:57:04 -07:00
Mattt Thompson
b3d63b58c0
Use requestWithURL: instead of requestWithURL:cachePolicy:timeout: in UIImageView category to use default cache policy and timeout
2012-08-13 13:19:51 -07:00
bratley Lower
59ef3550d5
add accept header for set uiimage by url
2012-08-12 09:52:31 -05:00
Mattt Thompson
f1b3101a63
First pass at converting to ARC
2012-06-26 09:14:52 -07:00
Mattt Thompson
9adb586a82
[Issue #308 ] Fixing crash caused by attempting to cache invalid or nil image
2012-04-19 10:31:45 -05:00
John Wu
ec3b922288
since there is no guarantee that
...
cancelling a request => success/fail block will not be called,
you shouldn't nil out a request unless it corresponds to the correct URL.
Essentially, this fixes the problem where images are sometimes not loaded.
2012-04-13 11:04:13 -07:00
Mattt Thompson
14aea9ee58
[Issue #268 ] Reverting to cacheing UIImages rather than NSPurgeableData-wrapped image data
2012-04-08 14:26:52 -07:00
Mattt Thompson
f8fd95e26a
Refactoring UIImageView+AFNetworking to remove unused aspects of AFImageCache, and to prevent unexpected or incorrect cacheing behavior
2012-02-14 09:12:19 -08:00
Mattt Thompson
df21de7e63
Merge branch 'experimental-thread-safe' into experimental-0.9
...
Conflicts:
AFNetworking/AFURLConnectionOperation.m
2012-01-19 16:55:00 -08:00
Mattt Thompson
3ff5aafab7
Removing AFImageCache from public API, embedding it instead in UIImageView+AFNetworking implementation
2012-01-19 11:58:17 -08:00
Mattt Thompson
1c606919fc
UIImageView shouldn't set image to placeholder image whenever an old image request comes in
2011-12-08 12:43:39 -06:00
Cameron Boehmer
6415cade69
in UIImageView+AFNetworking, calling net request success callback after setting UIImageView.image (symmetrical with cached image retrieval/callback)
2011-11-29 17:26:33 -08:00
Mattt Thompson
1f750a36fe
Removing useless check for cache policy before cacheing images in success callback
2011-11-21 12:44:32 -06:00
Mattt Thompson
97191228e0
Fixing default cache policy for URL requests objects in UIImageView category
2011-11-21 12:42:08 -06:00
Mattt Thompson
c466a24ae2
Fixing UIImageView category to work with AFImageRequestOperation refactoring
2011-11-21 10:40:09 -06:00
Mattt Thompson
58693e8d8c
Updating and revising documentation
2011-11-11 11:28:05 -06:00
Mattt Thompson
e9855af89d
Fixing race condition in UIImageView category with cached images. Thanks @iwat (Chaiwat S.)
2011-10-11 17:07:27 -05:00
Mattt Thompson
358ecb568c
Merge branch 'experimental-0.7' into experimental-mac
...
Conflicts:
AFNetworking/AFHTTPRequestOperation.m
AFNetworking/AFImageRequestOperation.h
AFNetworking/AFImageRequestOperation.m
AFNetworking/AFNetworkActivityIndicatorManager.m
2011-10-11 10:01:44 -05:00
Mattt Thompson
80a0c65608
Merge branch 'master' into experimental-mac
...
Conflicts:
AFNetworking/AFNetworkActivityIndicatorManager.m
iOS Example/AFNetworking iOS Example.xcodeproj/project.pbxproj
2011-10-11 09:58:00 -05:00
Mattt Thompson
b7724922c4
Refactoring image request operation
2011-10-10 13:06:12 -05:00
Mattt Thompson
263e2f3d5c
[Issue #59 ] Removing unnecessary dispatch in UIImageView category
2011-10-10 10:04:57 -05:00
Mattt Thompson
c2be31d4fa
First implementation of protocol for AFHTTPClient to register classes to automatically determine the appropriate operation to create
...
Wrapping AFURLConnectionOperation -setCompletionBlock: with blockSelf release pattern to avoid retain cycle
2011-10-05 15:44:51 -05:00
Mattt Thompson
561df45eb7
Initial working implementation of new candidate class structure
2011-10-04 00:13:12 -05:00
Mattt Thompson
421032fe90
Removing logic to set UIImageView image cache name based on placeholder image dimensions
...
Renaming constant used to associate category objects in UIImageView category
2011-09-26 11:03:33 -05:00
Mattt Thompson
e1f7528a09
Removing strangely intrusive logic to resize an image to placeholder image size
2011-09-26 08:48:04 -05:00
Mattt Thompson
efdaedc541
Adding Mac example project
...
Renaming iOS example project
Adding AFNetworking to Mac project using preprocessor macros to resolve UIKit dependencies, and setting compiler flags accordingly.
2011-09-23 12:19:40 -05:00
Mattt Thompson
42da37a5a3
Namespacing private methods in UIImageView category
2011-09-22 11:42:48 -05:00
Mattt Thompson
eebc763f7f
Adding documentation to UIImageView category
...
Changing API for setImageWithURLRequest:placeholderImage:success to setImageWithURLRequest:placeholderImage:success:failure
2011-09-22 11:30:13 -05:00
Mattt Thompson
2a8cce88a5
Changing AFImageCache APIs to use URLs rather than NSURLRequests
...
Completing documentation for AFImageCache
2011-09-21 23:46:00 -05:00
Mattt Thompson
e7aba7d47a
Making most explicit UIImageView image setting method take NSURLRequest, to allow for overriding cache policy, timeout interval, and other request properties
2011-09-21 17:13:20 -05:00
Mattt Thompson
3b81cd32a7
Fixing optimization to not re-initiate duplicated calls to a UIImageView, by adding missing check to see if the last operation was cancelled
2011-09-21 15:50:22 -05:00
Mattt Thompson
f422cafe14
Removing UIImage category in favor of static function to resize images in UIImageView category implementation
2011-09-21 14:32:30 -05:00
Mattt Thompson
50014afa22
Refactoring image request API to remove unnecessary configuration, and focus the design goals of those classes
2011-09-16 22:40:52 -05:00
Mattt Thompson
76d9b2bfc8
Adding -cancelImageRequestOperation to UIImageView category
...
Improving performance of UIImageView -setImageWithURL:... by cancelling running operation if new image url request is different than passed url request
2011-09-15 14:29:29 -05:00
Peter Steinberger
1ec54e2595
add BOOL if cache was used to load image
...
This is useful for animation - if function directly returns, there's no need to animate the new image
2011-09-12 17:36:20 +02:00
Peter Steinberger
908d77aaaf
execute custom block _before_ setting image
...
This is particularly useful if you want to animate the image change, e.g. with a core animation block - that's not possible after image is changed.
2011-09-12 17:20:50 +02:00