Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 1.19 KB

README.md

File metadata and controls

69 lines (43 loc) · 1.19 KB

PopUpButton

A control for selecting an item from a list. In other words, single motion version of NSPopUpButton for iOS, and original version for Mac Catalyst.

public final class PopUpButton : UIControl {

    public var itemsColor: UIColor? { get set }

    public var selectedItemColor: UIColor? { get set }

    public var cover: Cover { get set }

    public var anchor: Anchor { get set }

    public var items: [Item] { get set }

    public var currentIndex: Int { get set }
    
    public var selectionTouchInsideOnly: Bool { get set }

    public struct Item {
        public let title: String
    }

    public enum Anchor {
        case window
        case superview
    }
    
    public enum Cover {
        case color(UIColor?)
        case blur(UIBlurEffect.Style)
    }
}

Example

Requirements

Swift 5+

Installation

Cocoapods

pod 'PopUpButton'

Swift Package Manager

.package(url: "https://github.com/k-o-d-e-n/PopUpButton.git", .branch("master"))

Author

k-o-d-e-n, [email protected]

License

PopUpButton is available under the MIT license. See the LICENSE file for more info.