Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView
SSSwiftUIGIFView is a custom controller designed to help load GIFs in SwiftUI. It supports loading GIFs from remote URLs, is compatible with both iOS and macOS, and implements a caching mechanism to improve loading times and reduce data usage.
https://github.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView
gif gifanimation gifview ios swiftui swiftui-components
Last synced: 3 months ago
JSON representation
SSSwiftUIGIFView is a custom controller designed to help load GIFs in SwiftUI. It supports loading GIFs from remote URLs, is compatible with both iOS and macOS, and implements a caching mechanism to improve loading times and reduce data usage.
- Host: GitHub
- URL: https://github.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView
- Owner: SimformSolutionsPvtLtd
- License: mit
- Created: 2020-01-07T10:23:54.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T12:36:21.000Z (7 months ago)
- Last Synced: 2024-10-19T22:30:38.708Z (3 months ago)
- Topics: gif, gifanimation, gifview, ios, swiftui, swiftui-components
- Language: Swift
- Homepage: https://swiftpackageindex.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView
- Size: 51.6 MB
- Stars: 86
- Watchers: 4
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-SS-Mobile - SSSwiftUIGIFView - SSSwiftUIGIFView is a custom controller which helps to load GIF in SwiftUI. (iOS Guides / SwiftUI)
README
# SSSwiftUIGIFView
![Swift Package Index](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSSwiftUIGIFView%2Fbadge%3Ftype%3Dswift-versions)
![Swift Package Index](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSSwiftUIGIFView%2Fbadge%3Ftype%3Dplatforms)
![SPM Compatible-badge](https://img.shields.io/badge/Swift_Package_Manager-compatible-coolgreen)
[![Version](https://img.shields.io/cocoapods/v/SSSwiftUIGIFView.svg?style=flat)](https://cocoapods.org/pods/SSSwiftUIGIFView)
[![License](https://img.shields.io/cocoapods/l/SSSwiftUIGIFView.svg?style=flat)](https://cocoapods.org/pods/SSSwiftUIGIFView)
[![PRs Welcome][PR-image]][PR-url]
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/simform)SSSwiftUIGIFView is a custom controller designed to help load GIFs in SwiftUI. It supports loading GIFs from remote URLs, is compatible with both iOS and macOS, and implements a caching mechanism to improve loading times and reduce data usage. Additionally, it provides both a default progress view and support for custom progress views while loading the GIF.
## Features
- [x] Support for loading local GIFs and GIFs from remote URLs
- [x] Cache mechanism support
- [x] Cross-platform compatibility (iOS & macOS)
- [x] Custom and default progress view support## Requirements
- iOS 14.0+
- MacOS 13.0+
- Xcode 11+## Installation
**CocoaPods**SSSwiftUIGIFView is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'SSSwiftUIGIFView'
```**Swift Package Manager**
When using Xcode 11 or later, you can install `SSSwiftUIGIFView` by going to your Project settings > `Swift Packages` and add the repository by providing the GitHub URL. Alternatively, you can go to `File` > `Add Package Dependencies...`
dependencies: [
.package(url: "https://github.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView.git", from: "2.0.0")
]
**Manually**1. Add `GIFCache.swift`, `GIFImageViewModel.swift`, `GIFPlayerView.swift` and `SwiftUIGIFPlayerView.swift` to your project.
2. Grab yourself a cold πΊ.## Documentation
[Documentation](https://swiftpackageindex.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView/master/documentation/ssswiftuigifview) - Find the full API reference for more detailed documentation.
## Usage example
-
**Import framework**import SSSwiftUIGIFView
-
**Load GIF with SwiftUIGIFPlayerView function**
SwiftUIGIFPlayerView(gifName: "Gif Name")-
**Load GIF URL with SwiftUIGIFPlayerView function**
SwiftUIGIFPlayerView(gifURL: gifURL) // Here the gifURL is a link to a GIF.
-
**If we want to show the default progress bar while loading a GIF**
// Default value for isShowProgressView is false
SwiftUIGIFPlayerView(gifURL: gifURL, isShowProgressView: true)
-
**If we want to show a custom progress bar while loading a GIF**
SwiftUIGIFPlayerView(gifURL: gifURL) {
//Custom Progress bar view
}
## How to Contribute π€
Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle:
Check out our [**Contributing Guide**](CONTRIBUTING.md) for ideas on contributing.## Find this example useful? β€οΈ
Support it by joining [stargazers](https://github.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView/stargazers) :star: for this repository.
## Bugs and Feedback
For bugs, feature feature requests, and discussion use [GitHub Issues](https://github.com/SimformSolutionsPvtLtd/SSSwiftUIGIFView/issues).
## Check out our other Libraries
π Simform Solutions Librariesβ
## MIT License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
[PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[PR-url]:http://makeapullrequest.com
[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg
[swift-url]: https://swift.org/
[Swift Compatibility-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSSwiftUIGIFView%2Fbadge%3Ftype%3Dswift-versions
[Platform Compatibility-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSSwiftUIGIFView%2Fbadge%3Ftype%3Dplatforms