SwiftyCounterDemo is a sample application demonstrating the usage of SwiftyCounter as a Swift Package Manager (SPM) dependency. This app showcases how to integrate and use the SwiftyCounter library in a Swift-based project.
- Demonstrates integration of SwiftyCounter using SPM.
- Provides a simple UI to interact with and test the features of SwiftyCounter.
- Easily extendable to include additional functionality.
- iOS 17.0+ / macOS 14.15+
- Xcode 15.0 or later
- Swift 5.0 or later
Clone this repository to your local machine:
git clone https://github.com/muruganandham/swiftycounterdemo.git
cd swiftycounterdemo
The project already includes SwiftyCounter as a dependency via SPM. To check or update dependencies:
- Open the project in Xcode.
- Go to File > Swift Packages > Add Package Dependency.
- Enter the URL for SwiftyCounter:
https://github.com/muruganandham/swiftycounter
. - Follow the prompts to add the package.
- Open the
SwiftyCounterDemo.xcodeproj
in Xcode. - Build and run the project on your desired simulator or device.
- Interact with the UI to test SwiftyCounter's functionality, such as incrementing and decrementing counters.
SwiftyCounter provides the core functionality for managing counters. Here is how it is us
ed in the demo:
import SwiftyCounter
@State private var rating: Int = 5 // default value
// Create a SwiftyCounter view
SwiftyCounter(rating: $rating, step: 5)
The demo app demonstrates these functionalities via a user-friendly interface.
demo.mov
Contributions are welcome! Feel free to submit issues or pull requests to improve the demo or its integration with SwiftyCounter.