Skip to content

Small, custom control that mimics the delightful style of iOS 8-10 Control Centre buttons

Notifications You must be signed in to change notification settings

wiencheck/CCButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Small, custom control that mimics the delightful style of iOS 8-10 Control Centre buttons

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages