Swiftpack.co - wiencheck/CCButton as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by wiencheck.
wiencheck/CCButton 1.0.2
Small, custom control that mimics the delightful style of iOS 8-10 Control Centre buttons
⭐️ 3
🕓 1 year ago
iOS
.package(url: "https://github.com/wiencheck/CCButton.git", from: "1.0.2")

CCButton

CCButton is a cool little UIControl subclass that mimics the looks and behaviour of the delightful iOS 8-10 era Control Center's buttons. It's easy to customize, both via code as well as Storyboards.

Installation

Swift Package Manager

CCButton is available via SPM, to install it paste this repo's address into Xcode:

https://github.com/wiencheck/BoldButton

Usage

Use the image property to set custom image.

Use the tintColor property to change color of the button while in selected state. Changing tint doesn't have any effect unless the button is selected.

Use the pressHandler property to add your action to the .touchUpInside event without using the target-action pattern. As CCButton subclasses UIControl you can always use the .addTarget... or the new .addAction... method starting with iOS 14.

Loading indicator

CCButton can present a loading state. To activate it just set the isLoading property to true.

GitHub

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

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