Update the demo and readme with new baseline JPEG images

This commit is contained in:
DreamPiggy 2019-11-10 18:25:41 +08:00
parent c31917a82c
commit bbdcd8db89
3 changed files with 7 additions and 8 deletions

View File

@ -31,6 +31,7 @@ struct ContentView: View {
"https://nokiatech.github.io/heif/content/image_sequences/starfield_animation.heic",
"https://www.sample-videos.com/img/Sample-png-image-1mb.png",
"https://nr-platform.s3.amazonaws.com/uploads/platform/published_extension/branding_icon/275/AmazonS3.png",
"https://raw.githubusercontent.com/ibireme/YYImage/master/Demo/YYImageDemo/mew_baseline.jpg",
"http://via.placeholder.com/200x200.jpg"]
@State var animated: Bool = false // You can change between WebImage/AnimatedImage

View File

@ -78,7 +78,7 @@ let package = Package(
### Using `WebImage` to load network image
- [x] Supports placeholder and detail options control for image loading as SDWebImage
- [x] Supports progressive image loading
- [x] Supports progressive image loading (like baseline)
- [x] Supports success/failure/progress changes event for custom handling
- [x] Supports indicator with activity/progress indicator and customization
- [x] Supports built-in animation and transition, powered by SwiftUI
@ -108,17 +108,17 @@ Note: This `WebImage` using `Image` for internal implementation, which is the be
### Using `AnimatedImage` to play animation
- [x] Supports network image as well as local data and bundle image
- [x] Supports animated progressive image loading
- [x] Supports animated progressive image loading (like web browser)
- [x] Supports animation control using the SwiftUI Binding
- [x] Supports indicator and transition, powered by SDWebImage and Core Animation
- [x] Supports advanced control like loop count, incremental load, buffer size
- [x] Supports advanced control like loop count, playback rate, buffer size, runloop mode, etc
- [x] Supports coordinate with native UIKit/AppKit/WatchKit view
```swift
var body: some View {
Group {
// Network
AnimatedImage(url: URL(string: "https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"))
AnimatedImage(url: URL(string: "https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"), options: [.progressiveLoad]) // Progressive Load
.onFailure { error in
// Error
}

View File

@ -7,8 +7,6 @@
*/
#import <Foundation/Foundation.h>
#import <SDWebImageSwiftUI/SDAnimatedImageInterface.h>
#import <SDWebImageSwiftUI/SDAnimatedImageInterfaceWrapper.h>
//! Project version number for SDWebImageSwiftUI.
FOUNDATION_EXPORT double SDWebImageSwiftUIVersionNumber;
@ -17,5 +15,5 @@ FOUNDATION_EXPORT double SDWebImageSwiftUIVersionNumber;
FOUNDATION_EXPORT const unsigned char SDWebImageSwiftUIVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <SDWebImageSwiftUI/PublicHeader.h>
#import <SDWebImageSwiftUI/SDAnimatedImageInterface.h>
#import <SDWebImageSwiftUI/SDAnimatedImageInterfaceWrapper.h>