Swiftpack.co - ho0t/BisKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by ho0t.
ho0t/BisKit v1.1
BisKit is an iOS library to generate beautiful popups as the one featured when Apple Pencil is attached to the new iPad Pro.
⭐️ 76
🕓 3 years ago
iOS
.package(url: "https://github.com/ho0t/BisKit.git", from: "v1.1")

🍪 BisKit

BisKit is an iOS library to generate beautiful popups as the one featured when Apple Pencil is attached to the new iPad Pro.

...but you can also add other elements, that will be shown after the first animation. We call them toppings!

Requirements

  • Xcode 10 and later
  • iOS 12 and later
  • Swift 4.2 and later

Installation

Carthage

To install BisKit through Carthage, simply add this line to your Cartfile:

github "ho0t/BisKit"

CocoaPods

To install BisKit through CocoaPods, simply add this line to your Podfile:

pod 'BisKit'

Swift Package Manager (Xcode 11+)

Open your project, select File > Swift Packages > Add Package Depedency and paste the repository URL into the search bar.

A more detailed guide can be found here: Adding Package Dependencies to Your App

Usage

Basic

To open a new Biscuit, create a new instance of BiscuitViewController and present it as a usual view controller:

let biscuit = BiscuitViewController(title: "My Pencil", timeout: 1.5)
self.present(biscuit, animated: true, completion: nil)

Add toppings 🍬

If you want to add one or more toppings, create a new instance of BiscuitViewController by passing an array of UIViews into the initializers and present it as a usual view controller.

Built-in toppings

Label

let label = ToppingLabel(text: "Battery is low.")
let biscuit = BiscuitViewController(title: "My Pencil", timeout: 1.5)
self.present(biscuit, animated: true, completion: nil)
Battery

let percentage = ToppingLabel(level: 0.5, batteryState: .charging) 
let biscuit = BiscuitViewController(title: "My Pencil", timeout: 1.5)
self.present(biscuit, animated: true, completion: nil)

TODO

While the library is working, there are still some tasks to do, like:

  • Writing tests
  • Fix minor UI issues
  • Create other built-in toppings
  • etc.

If you would like to contribute to this project, feel free to do it: your help will be really appreciated! 😉

License

This open source component is released under MIT License.

Authors

Nicola Giancecchi (Twitter) and Giovanni Filaferro (Twitter).

GitHub

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

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