https://github.com/k-o-d-e-n/popupbutton
A control for selecting an item from a list. In other words, single motion `NSPopUpButton` for iOS.
https://github.com/k-o-d-e-n/popupbutton
catalyst nspopupbutton popup popupbutton uicontrol-subclass
Last synced: about 2 months ago
JSON representation
A control for selecting an item from a list. In other words, single motion `NSPopUpButton` for iOS.
- Host: GitHub
- URL: https://github.com/k-o-d-e-n/popupbutton
- Owner: k-o-d-e-n
- License: mit
- Created: 2020-06-28T12:18:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-07T12:16:14.000Z (almost 6 years ago)
- Last Synced: 2025-02-14T17:02:09.572Z (over 1 year ago)
- Topics: catalyst, nspopupbutton, popup, popupbutton, uicontrol-subclass
- Language: Swift
- Homepage:
- Size: 155 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```swift
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
```ruby
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, koden.u8800@gmail.com
## License
PopUpButton is available under the MIT license. See the LICENSE file for more info.