Skip to content

Commit

Permalink
Bump version to 0.1.2
Browse files Browse the repository at this point in the history
update the README
  • Loading branch information
dreampiggy committed Oct 1, 2019
1 parent e9c28e5 commit 269a150
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Note we do not guarantee the public API stable for current status. Since SwiftUI
+ macOS 10.15+
+ tvOS 13+
+ watchOS 6+
+ Swift 5.1+

## Installation

Expand Down Expand Up @@ -64,9 +65,12 @@ let package = Package(

It supports the placeholder and detail options control for image loading as SDWebImage.

Note: Unlike `UIImageView` in UIKit, SwiftUI's `Image` does not support animation. This `WebImage` using `Image` for internal implementation and supports static image format only.

```swift
var body: some View {
WebImage(url: URL(string: "https://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic"))
.resizable()
.scaledToFit()
.frame(width: 300, height: 300, alignment: .center)
}
Expand All @@ -77,11 +81,13 @@ var body: some View {
```swift
var body: some View {
AnimatedImage(url: URL(string: "https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"))
.scaledToFit()
AnimatedImage(data: try! Data(contentsOf: URL(fileURLWithPath: "/tmp/foo.webp")))
.scaledToFill()
}
```

It supports both image url or image data for animated image format. Which use the SDWebImage's [Animated ImageView](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#animated-image-50) for internal implementation.
Note: `AnimatedImage` supports both image url or image data for animated image format. Which use the SDWebImage's [Animated ImageView](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#animated-image-50) for internal implementation.

## Demo

Expand Down
2 changes: 1 addition & 1 deletion SDWebImageSwiftUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SDWebImageSwiftUI'
s.version = '0.1.1'
s.version = '0.1.2'
s.summary = 'Integration of SDWebImage Asynchronous image loading and SwiftUI framework'

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageSwiftUI/Module/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.1.1</string>
<string>0.1.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down

0 comments on commit 269a150

Please sign in to comment.