NavButton
@available(iOS 9.0, *)
public class NavButton : Button
A UISwitch that handles its own action and navigation
-
Creates a UIButton
Declaration
Swift
public init( title: String, tapHandler: (() -> Void)? = nil, destination: @escaping () -> UIViewController, style: Navigate.NavigationStyle, titleColor: UIColor? = nil, backgroundColor: UIColor? = nil )Parameters
titleText used for the button’s title
tapHandlerClosure for the the button’s action (Default: nil)
destinationDestination view to navigate to when tapped
styleNavigation style for presenting the destination view
titleColorColor used for the title’s font (Default: nil)
backgroundColorColor used for the button’s background color (Default: nil)
-
Creates a UIButton with a label view
Declaration
Swift
public init( tapHandler: (() -> Void)? = nil, destination: @escaping () -> UIViewController, style: Navigate.NavigationStyle, labelView: () -> UIView )Parameters
tapHandlerClosure for the the button’s action (Default: nil)
destinationDestination view to navigate to when tapped
styleNavigation style for presenting the destination view
labelViewThe view to embed
View on GitHub
NavButton Class Reference