Description
A perfect option picker. Great for navigation. Simple to use.
Try it out with @fermoya's package SwiftUIPager!
Swift Package Manager
SwiftUISelector is available through Swift Package Manager.
Add it to an existing Xcode project as a package dependency:
From the File menu, select Swift Packages › Add Package Dependency…
Enter "https://github.com/p-larson/SwiftUISelector" into the package repository URL text field
or
Copy and Paste SwiftUIPager.swift into your project!
SwiftUISelector alternatives and similar libraries
Based on the "Menu" category.
Alternatively, view SwiftUISelector alternatives based on common mentions on social networks and blogs.
-
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
GuillotineMenu
Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine. -
PagingMenuController
Paging view controller with customizable menu in Swift. -
ENSwiftSideMenu
A simple side menu for iOS written in Swift. -
Panels
Panels is a framework to easily add sliding panels to your application -
PagingKit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries. -
YNDropDownMenu
✨ Awesome Dropdown menu for iOS with Swift 5.0 -
SwipeMenuViewController
Swipable tab and menu View and ViewController. -
FlowingMenu
Interactive view transition to display menus with flowing and bouncing effects in Swift -
InteractiveSideMenu
iOS Interactive Side Menu written in Swift. -
MenuItemKit
UIMenuItem with image and closure(block) action -
SwiftUI Drawer
A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize. -
PagerTabStripView
🚀 Elegant Pager View fully written in pure SwiftUI. -
FrostedSidebar
Hamburger Menu using Swift and iOS 8 API's -
DropDownMenuKit
UIKit drop down menu, simple yet flexible and written in Swift -
KWDrawerController
Drawer view controller that easy to use! -
Swift-CircleMenu
Rotating circle menu written in Swift 3 -
HHFloatingView
An easy to use and setup floating view for your app. 🎡
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SwiftUISelector or a related project?
README
SwiftUISelector
A perfect option picker. Great for navigation. Simple to use.
Try it out with @fermoya's package SwiftUIPager!
Swift Package Manager
SwiftUISelector is available through Swift Package Manager.
Add it to an existing Xcode project as a package dependency:
- From the File menu, select Swift Packages › Add Package Dependency…
- Enter "https://github.com/p-larson/SwiftUISelector" into the package repository URL text field
or
Copy and Paste SwiftUIPager.swift into your project!
Features :sparkles:
- Smooth Selection
- User Control
- Dynamic Options
- Simple Animations
Requirements
- iOS 14, macOS 10.15
- Swift 5.3
Initialization
Important to note:
SelectorView<Option, OptionView>: View where Option: Hashable, OptionView: View
Use Strings for Options (Intended Initializer)
// SelectorView(selectedOption: Binding<Int>, options: [String]) SelectorView( selectedOption: $selectedOption, options: ["Classial", "Star", "Zodiac", "Text Art"] )
Custom Options and Option View. (This is to give you a lot of freedom to make the SelectorView fit your needs)
/*
SelectorView(
selectedOption: Binding<Int>,
options: [Option],
@ViewBuilder content: @escaping (Option) -> OptionView
)
**/
SelectorView(selectedOption: $selectedOption, options: [1, 2, 3, 4]) { (option) in
Text(option.description)
.italic()
.padding()
.background(
Rectangle()
.fill(Color.clear)
.border(Color.black, width: 2)
.padding(.bottom, 4)
)
}
.font(
.system(
size: 24,
weight: Font.Weight.black,
design: Font.Design.monospaced
)
)
License
I'm not good with legal stuff, use my code as you wish, feel free to keep the credit tag in the code, idk.
Open Source, do what ever you want. Maybe follow me on Instagram I guess.
*Note that all licence references and agreements mentioned in the SwiftUISelector README section above
are relevant to that project's source code only.