Skip to content
/ Button Public

A UIButton subclass that let's you use UIColor as the background and border color.

License

Notifications You must be signed in to change notification settings

lipka/Button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Button

Version Build Status Swift Version

A UIButton subclass that makes it easy to use UIColor as the background and border color for different button states.

Installation

Swift Package Manager

For installation with Swift Package Manager, simply add the following to your Package.swift:

.package(url: "https://github.com/lipka/Button", from: "0.1.0")

Usage

Background Color

You can call setBorderColor(_:, for:) to set the background color for different UIControl.States.

import Button

let button = Button()
button.setBackgroundColor(UIColor.red, for: .normal)
button.setBackgroundColor(UIColor.blue, for: .highlighted)

Border Color

You can call setBorderColor(_:, for:) to set the border color for different UIControl.States.

import Button

let button = Button()
button.setBorderColor(UIColor.red, for: .normal)
button.setBorderColor(UIColor.blue, for: .highlighted)

About

A UIButton subclass that let's you use UIColor as the background and border color.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages