Commit Graph

36 Commits

Author SHA1 Message Date
DreamPiggy 86b1901e40 Added the missing shared xcscheme for visionOS 2023-09-02 23:08:13 +08:00
DreamPiggy 15990ac34f Added the temp Carthage support to build visionOS framework
Fix some new warning on Swift 5.9
2023-09-02 22:43:10 +08:00
DreamPiggy e29e0b9092 Merge branch 'master' of https://github.com/SDWebImage/SDWebImageSwiftUI into feature/visionOS 2023-09-02 21:42:51 +08:00
DreamPiggy 2d4839a195 Added visionOS support
Add visionOS Demo

The scale using traitCollection.displayScale
2023-09-02 21:24:41 +08:00
DreamPiggy 2909b0027a Drop iOS 13/macOS 10.15/tvOS 13/watchOS 6 support
Changes:
1. Backport sources are removed
2. Availability is changed
3. Use StateObject instead
2022-12-26 17:53:04 +08:00
DreamPiggy d281bde037 Fix the State change behavior again
Using the `StateObject` to check and refresh to the latest status, using `currentURL` and `currentAnimatedImage` to check lazily
2022-09-21 23:01:07 +08:00
DreamPiggy f263e8e049 Change to use CocoaPods to manage test case instead of Carthage 2022-09-15 20:48:57 +08:00
DreamPiggy ac0e73b1f8 Update ViewInspector to 0.9.1 2022-09-15 17:18:43 +08:00
DreamPiggy 4b7cbfcf06 Fix the CI, re-enable GitHub Actions 2022-09-15 15:06:16 +08:00
DreamPiggy 13090bcc98 Fix Carthage project 2022-09-15 01:18:28 +08:00
DreamPiggy 2398f563a5 Refactor WebImage implementation
1. Use SwiftUIBackport to use StateObject/OnChange/Overlay
2. Change the Indicator API to match the transform for ImageManager
3. Remove the unused PlatformApear hack
2022-09-15 00:24:30 +08:00
DreamPiggy b512e31d28 Fix the issue sometime the `WebImage` appear/disappear logic wrong. Using UIKit/AppKit to detect the visibility 2021-02-23 14:31:55 +08:00
DreamPiggy d564aa5ca1 Only use CGImage based when the EXIF orientation is not equal to Up. I think SwfitUI will fix this issue in the future and we'd better use UIImage as much as possible 2020-04-15 17:31:44 +08:00
DreamPiggy 0a41337ed0 Try to solve the SwiftUI bug of rendering EXIF UIImage in WebImage. Now we use the Image(decorative:) API to grab the CGImage and orientation instead. For vector image, draw vector image into bitmap for rescue 2020-04-15 12:40:25 +08:00
Jonas Bromö c5a1512b4e Don't embed SDWebImage.framework in SDWebImageSwiftUI.framework, solves https://github.com/SDWebImage/SDWebImageSwiftUI/issues/96 2020-04-10 10:01:57 +02:00
DreamPiggy 72c7c8d693 Change the API of completionHandler for ImageManager, without return value. Add test cases 2020-03-24 18:50:06 +08:00
DreamPiggy e7e85d8930 Do not add BUILD_LIBRARY_FOR_DISTRIBUTION for test target 2020-03-03 18:49:15 +08:00
DreamPiggy 465e5fc3a1 Ignore the Cartfile.resovled 2020-02-25 14:59:16 +08:00
DreamPiggy f193c612b1 Update the unit test to use the latest version of ViewInspector, which allows UIView/NSView inspection 2020-02-04 11:04:55 +08:00
DreamPiggy 3363162b03 Added the test case `testWebImageOnSuccessWhenMemoryCacheHit` 2020-02-01 17:53:28 +08:00
DreamPiggy b94f3a514e Added Indicator and Transition test case 2020-01-28 18:49:41 +08:00
DreamPiggy 65c48938c1 Fix the macOS support issue, using the folked Introspect for AppKit support 2020-01-27 16:54:39 +08:00
DreamPiggy 1bf9417ab6 Add the Unit Test for AnimatedImage and WebImage, by using ViewInspector and Introspect 2020-01-27 14:55:58 +08:00
DreamPiggy edae2e27a5 Add the weak linking for Xcode project (Carthage) 2019-12-06 21:31:41 +08:00
DreamPiggy 056cc69713 Use the BUILD_LIBRARY_FOR_DISTRIBUTION to generate swift interface instead of Swift module 2019-12-06 17:47:38 +08:00
DreamPiggy 36bc39acce Totally remove all previous Animated on watchOS implementation (which use WKInterfaceObject SPI) 2019-11-29 19:49:52 +08:00
DreamPiggy 4b2c5042fa Fix the watchOS compile issue, put the associated object and web cache category into a standalone file 2019-11-22 12:34:20 +08:00
DreamPiggy e01fa4047b Move the watchOS wrapper hack into another file, make it easy to distinguish from other code to maintain 2019-11-10 05:51:04 +08:00
DreamPiggy 7b5f7b88f4 Add the transition convenient API to simply usage, the transition now works as SwiftUI standard UI component, .fade transition is only fade in 2019-10-27 19:47:08 +08:00
DreamPiggy 40c5644569 Add activity indicator implementation as well, using UIProgressView/NSProgressIndicator 2019-10-25 22:55:19 +08:00
DreamPiggy 6a2eb0264a Add support for WebImage to use indicator. Using protocol and struct based solution, and with SwiftUI Binding for isAnimating and progress 2019-10-25 21:50:45 +08:00
DreamPiggy 7e21926830
Support AnimatedImage on watchOS - Using WatchKit bridge (#22)
* Temp for watchOS AnimatedImage support, using massive private API, still contains small issues

* Update the hack for wacthKit experienment, fix the retain cycle issue that cause WKInterfaceImage not dealloc

* Solve the merge conflict and try again

* Add support for contentMode

* Fix the SDAnimatedImageInterface first appear shows empty issues

* Fix the scale factor support for SDAniamtedImageInterface

* Fix the compile issue on other platforms

* Stop animtiong when dismantle for watchOS AnimatedImage

* Fix the issue that stopAnimating does not stop :)

* Fix the warning because of Apple's bug

* Use macro to integrate the watchOS Animation solution

* Refactory code to fix that calling sd_setImage(with:) multiple times issues

* Support to custom loop count on watchOS AnimatedImage

* Fix the CocoaPods issues which does not have umbrella headers

* Update some of the documentations

* Try to solve the SwiftPM issue because it does not support mixed Objective-C and Swift code, really suck, Apple :)

* Fix travis CI script to only build Carthage. Swift cli build can not works on Objective-C code import syntax, but works on Xcode
2019-10-22 01:09:57 +08:00
DreamPiggy 611ab6125e Support AnimatedImage with `aspectRatio`, `antialiased`, `interpolation`, `renderingMode` and `resizable` methods, some of them is not fully implemented 2019-10-01 14:34:11 +08:00
DreamPiggy 9f3a03ff1a Fix the Carthage compatible issue 2019-09-25 01:26:52 +08:00
DreamPiggy 15d4805a96 Update the licences description in source files 2019-08-09 17:17:08 +08:00
DreamPiggy 248515a2d6 Add the Xcode project to support Carthage. Fix the build issue on macOS/tvOS/watchOS 2019-08-09 15:58:21 +08:00