Swiftpack.co - xnth97/TrophyKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by xnth97.
xnth97/TrophyKit 0.2.1
An animated trophy banner that looks like Xbox achievement 🏆
⭐️ 13
🕓 2 years ago
iOS tvOS
.package(url: "https://github.com/xnth97/TrophyKit.git", from: "0.2.1")

TrophyKit

An animated trophy banner that looks like Xbox achievement.

Version License Platform

Demo

https://user-images.githubusercontent.com/6781789/123460143-0b87dd80-d59c-11eb-97f9-4951e914a106.mov

Usage

Requirements

  • iOS 14.0+
  • tvOS 14.0+
  • Swift 5.3+

Installation

TrophyKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TrophyKit'

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

API

/// Create a trophy instance with a configuration. It is efficient to retain a trophy instance
/// and call `show` with different parameters.
let trophy = Trophy(configuration: TrophyConfiguration(size: .medium))
/// Show the trophy in view controller.
trophy.show(from: self,
            title: "Achievement Unlocked",
            subtitle: "You have added a new skill!",
            iconSymbol: "gamecontroller.fill",
            trophyIconSymbol: "rosette")

TODO

  • ☑ Performance optimization and support reuse
  • ☑ tvOS support
  • ☐ More customization APIs
  • ☐ Tweak animation and visual
  • ☐ Sound and haptic support
  • ☑ Swift Package Manager
  • ☐ Queue for multiple trophies
  • ☐ Position for display trophy banner
  • ☐ Manually hide banner
  • ☐ Support anchor view like toolbar or tab bar
  • ☐ Interactions like tap target and completion block

License

TrophyKit is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 13
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v0.2.1
2 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics