Fix typos

This commit is contained in:
Vladimir Pavlov 2020-11-29 03:21:30 +03:00
parent 16ccd761e8
commit 79b0f5d433
2 changed files with 11 additions and 11 deletions

View File

@ -57,7 +57,7 @@ Note: neither your success nor failure block will be call if your image request
The `SDWebImageManager` is the class behind the `UIImageView(WebCache)` category. It ties the asynchronous downloader with the image cache store. You can use this class directly to benefit from web image downloading with caching in another context than a `UIView` (ie: with Cocoa). The `SDWebImageManager` is the class behind the `UIImageView(WebCache)` category. It ties the asynchronous downloader with the image cache store. You can use this class directly to benefit from web image downloading with caching in another context than a `UIView` (ie: with Cocoa).
Note: When the image is from memory cache, it will not contains any `NSData` by default. However, if you need image data, you can pass `SDWebImageQueryDataWhenInMemory` in options arg. Note: When the image is from memory cache, it will not contain any `NSData` by default. However, if you need image data, you can pass `SDWebImageQueryDataWhenInMemory` in options arg.
Here is a simple example of how to use `SDWebImageManager`: Here is a simple example of how to use `SDWebImageManager`:
@ -95,11 +95,11 @@ SDWebImageDownloader *downloader = [SDWebImageDownloader sharedDownloader];
### Using Asynchronous Image Caching Independently ### Using Asynchronous Image Caching Independently
It is also possible to use the async based image cache store independently. SDImageCache It is also possible to use the async based image cache store independently. `SDImageCache`
maintains a memory cache and an optional disk cache. Disk cache write operations are performed maintains a memory cache and an optional disk cache. Disk cache write operations are performed
asynchronous so it doesn't add unnecessary latency to the UI. asynchronous so it doesn't add unnecessary latency to the UI.
The SDImageCache class provides a singleton instance for convenience but you can create your own The `SDImageCache` class provides a singleton instance for convenience but you can create your own
instance if you want to create separated cache namespace. instance if you want to create separated cache namespace.
To lookup the cache, you use the `queryDiskCacheForKey:done:` method. If the method returns nil, it means the cache To lookup the cache, you use the `queryDiskCacheForKey:done:` method. If the method returns nil, it means the cache
@ -114,10 +114,10 @@ SDImageCache *imageCache = [[SDImageCache alloc] initWithNamespace:@"myNamespace
}]; }];
``` ```
By default SDImageCache will lookup the disk cache if an image can't be found in the memory cache. By default `SDImageCache` will lookup the disk cache if an image can't be found in the memory cache.
You can prevent this from happening by calling the alternative method `imageFromMemoryCacheForKey:`. You can prevent this from happening by calling the alternative method `imageFromMemoryCacheForKey:`.
To store an image into the cache, you use the storeImage:forKey:completion: method: To store an image into the cache, you use the `storeImage:forKey:completion:` method:
```objective-c ```objective-c
[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey completion:^{ [[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey completion:^{
@ -126,14 +126,14 @@ To store an image into the cache, you use the storeImage:forKey:completion: meth
``` ```
By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If
you want only the memory cache, use the alternative method storeImage:forKey:toDisk:completion: with a negative you want only the memory cache, use the alternative method `storeImage:forKey:toDisk:completion:` with a negative
third argument. third argument.
### Using cache key filter ### Using cache key filter
Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic
(i.e.: for access control purpose). SDWebImageManager provides a way to set a cache key filter that (i.e.: for access control purpose). `SDWebImageManager` provides a way to set a cache key filter that
takes the NSURL as input, and output a cache key NSString. takes the `NSURL` as input, and output a cache key `NSString`.
The following example sets a filter in the application delegate that will remove any query-string from The following example sets a filter in the application delegate that will remove any query-string from
the URL before to use it as a cache key: the URL before to use it as a cache key:

View File

@ -166,7 +166,7 @@ This animated image solution is available for `iOS`/`tvOS`/`macOS`. The `SDAnima
The `SDAnimatedImageView` supports the familiar image loading category methods, works like drop-in replacement for `UIImageView/NSImageView`. The `SDAnimatedImageView` supports the familiar image loading category methods, works like drop-in replacement for `UIImageView/NSImageView`.
Don't have UIView (like WatchKit or CALayer)? you can still use `SDAnimatedPlayer` the player engine for advanced playback and rendering. Don't have `UIView` (like `WatchKit` or `CALayer`)? you can still use `SDAnimatedPlayer` the player engine for advanced playback and rendering.
See [Animated Image](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#animated-image-50) for more detailed information. See [Animated Image](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#animated-image-50) for more detailed information.
@ -209,9 +209,9 @@ pod 'SDWebImage', '~> 5.0'
##### Swift and static framework ##### Swift and static framework
Swift project previously have to use `use_frameworks!` to make all Pods into dynamic framework to let CocoaPods works. Swift project previously had to use `use_frameworks!` to make all Pods into dynamic framework to let CocoaPods work.
However, start with `CocoaPods 1.5.0+` (with `Xcode 9+`), which supports to build both Objective-C && Swift code into static framework. You can use modular headers to use SDWebImage as static framework, without the need of `use_frameworks!`: However, starting with `CocoaPods 1.5.0+` (with `Xcode 9+`), which supports to build both Objective-C && Swift code into static framework. You can use modular headers to use SDWebImage as static framework, without the need of `use_frameworks!`:
``` ```
platform :ios, '8.0' platform :ios, '8.0'