Updated the migration guide
Showing
1 changed file
with
16 additions
and
4 deletions
@@ -27,16 +27,28 @@ With 4.0, the ones marked as `nullable` will be regular optionals, as the `nonnu | @@ -27,16 +27,28 @@ With 4.0, the ones marked as `nullable` will be regular optionals, as the `nonnu | ||
27 | 27 | ||
28 | For details, read [Nullability and Objective-C](https://developer.apple.com/swift/blog/?id=25). | 28 | For details, read [Nullability and Objective-C](https://developer.apple.com/swift/blog/?id=25). |
29 | 29 | ||
30 | -#### Simple case | 30 | +#### Using the UI*View categories brings no change |
31 | 31 | ||
32 | SDWebImage 3.x | 32 | SDWebImage 3.x |
33 | ``` | 33 | ``` |
34 | -[imageView sd_setImageWithURL:url]; | 34 | +[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; |
35 | ``` | 35 | ``` |
36 | 36 | ||
37 | SDWebImage 4.x | 37 | SDWebImage 4.x |
38 | ``` | 38 | ``` |
39 | -[imageView sd_setImageWithURL:url]; | 39 | +[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; |
40 | +``` | ||
41 | + | ||
42 | +#### Using directly SDWebImageManager | ||
43 | + | ||
44 | +SDWebImage 3.x | ||
45 | +``` | ||
46 | +[manager downloadImageWithURL:url options:options: progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { ... } ]; | ||
47 | +``` | ||
48 | + | ||
49 | +SDWebImage 4.x | ||
50 | +``` | ||
51 | +[manager loadImageWithURL:url options:options: progress:nil completed:^(UIImage *image, NSData *imageData, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { ... } ]; | ||
40 | ``` | 52 | ``` |
41 | 53 | ||
42 | ### Entities | 54 | ### Entities |
@@ -183,4 +195,4 @@ SDWebImage 4.x | @@ -183,4 +195,4 @@ SDWebImage 4.x | ||
183 | #### UIImage | 195 | #### UIImage |
184 | - removed `sd_animatedGIFNamed:` or `sd_animatedImageByScalingAndCroppingToSize:` | 196 | - removed `sd_animatedGIFNamed:` or `sd_animatedImageByScalingAndCroppingToSize:` |
185 | - added `isGIF` | 197 | - added `isGIF` |
186 | -- added `sd_imageData` and `sd_imageDataAsFormat:`. Those methods transform a `UIImage` to the `NSData` representation | ||
198 | +- added `sd_imageData` and `sd_imageDataAsFormat:`. Those methods transform a `UIImage` to the `NSData` representation |
-
Please register or login to post a comment