Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BetterButton

Swift

iOS UIButton framework that facilitates adding beautiful buttons to your projects! πŸ”΄

In my other projects, I always found myself styling buttons in similar fashion. Therefore I decided to create the BetterButton, which inherits from UIButton but has all the styling already done. Which saves me time and looks very good with no extra code no boilerplate code required!

Goals

My goals with this are to:

  • Button can shake
  • Button can display a loading icon (button.displayLoadingIcon())
  • Button can display a loading bar in the background
  • Add this project to CocoaPods to allow others to use it as well

What it currently looks like

Alt Text Pulse Button

How to use

Use it exactly like a normal UIButton, except it has some additional functionality such as shacking and pre-defined color themes. (more to come!)

let mainButton : BetterButton = {
    let btnFrame = CGRect(x: 50.0, y: 50.0, width: 200.0, height: 40.0)
    let btn = BetterButton(frame: btnFrame, style: .Rounded, color: .Purple)
    btn.setTitle("Enter", for: .normal)
    btn.translatesAutoresizingMaskIntoConstraints = false
    return btn
}()

About

iOS UIButton framework that facilitates adding beautiful buttons to your projects! πŸ”΄

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages