Skip to content

leotok/ButtonStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ButtonStack

A custom view for iOS developers that provides a stack with up to four buttons.

How to

Add the following delegate to your viewcontroller:

class ViewController: UIViewController, ButtonStackViewControllerDelegate

and call it inside an action:

  var stack = ButtonStackViewController(mainButton: button, numberOfButtons: 4)
  stack.delegate = self
  self.presentViewController(stack, animated: false, completion: nil)

Protocol

Use this protocol to manage the selected button from the stack:

  func buttonStack(buttonStack: ButtonStackViewController, didSelect button: UIButton, atIndexPath indexPath: NSIndexPath)

and this one to know when the cancel button is pressed:

  func buttonStackDidCancel(buttonStack: ButtonStackViewController)

About

πŸ“±πŸŽ A custom view for iOS that provides a stack with up to four buttons just like Google's apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages