JNDropDownMenu alternatives and similar libraries
Based on the "Menu" category.
Alternatively, view JNDropDownMenu alternatives based on common mentions on social networks and blogs.
-
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
PageMenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
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. -
BTNavigationDropdownMenu
The elegant yet functional dropdown menu, written in Swift, appears underneath the navigation bar to display a list of defined items when a user clicks on the navigation title. -
PagingKit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries. -
CategorySliderView
slider view for choosing categories. add any UIView type as category item view. Fully customisable -
RadialMenu
RadialMenu is a custom control for providing a touch context menu (like iMessage recording in iOS 8) built with Swift & POP -
DTPagerController
A fully customizable container view controller to display a set of ViewControllers in a horizontal scroll view. Written in Swift. -
RHSideButtons
Library provides easy to implement variation of Android (Material Design) Floating Action Button for iOS. You can use it as your app small side menu. 🌶
SaaSHub - Software Alternatives and Reviews
* 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 JNDropDownMenu or a related project?
README
JNDropDownMenu
Overview
Swift version of https://github.com/dopcn/DOPDropDownMenu
Easy to use TableView style dropdown menu.
Setup
The only thing you need to do is import JNDropDownMenu
, create an instance and add it to your View
and conform to its datasource and delegate.
import JNDropDownMenu
// pass origin of menu, height - this will be height of collapsed menu not the expanded menu, width - it is optional, pass custom width or pass nil to utilize screen width
let menu = JNDropDownMenu(origin: CGPoint(x: 0, y: 64), height: 40, width: self.view.frame.size.width)
menu.datasource = self
menu.delegate = self
self.view.addSubview(menu)
Just implement datasource and delegate same as that of Tableview
extension ViewController: JNDropDownMenuDelegate, JNDropDownMenuDataSource {
func numberOfColumns(in menu: JNDropDownMenu) -> NSInteger {
return 2
}
func numberOfRows(in column: NSInteger, for forMenu: JNDropDownMenu) -> Int {
switch column {
case 0:
return columnOneArray.count
case 1:
return columnTwoArray.count
default:
return 0
}
}
func titleForRow(at indexPath: JNIndexPath, for forMenu: JNDropDownMenu) -> String {
switch indexPath.column {
case 0:
return columnOneArray[indexPath.row]
case 1:
return columnTwoArray[indexPath.row]
default:
return ""
}
}
func didSelectRow(at indexPath: JNIndexPath, for forMenu: JNDropDownMenu) {
var str = ""
switch indexPath.column {
case 0:
str = columnOneArray[indexPath.row]
break
case 1:
str = columnTwoArray[indexPath.row]
break
default:
str = ""
}
label.text = str + " selected"
}
}
Customization
There are very minimal customization available currently. You can alter color and font before setting menu datasource as follow:
let menu = JNDropDownMenu(origin: CGPoint(x: 0, y: 64), height: 40, width: self.view.frame.size.width)
//customize
menu.textColor = UIColor.red
menu.cellBgColor = UIColor.green
menu.arrowColor = UIColor.black
menu.cellSelectionColor = UIColor.white
menu.textFont = UIFont.boldSystemFont(ofSize: 15.0)
menu.updateColumnTitleOnSelection = false // Override titleFor(column: Int, menu: JNDropDownMenu) if you are setting this to false
menu.arrowPostion = .Left
menu.datasource = self
menu.delegate = self
self.view.addSubview(menu)
Find the above displayed examples in the Example
folder.
Installation
CocoaPods
JNDropDownMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "JNDropDownMenu"
Change Log
V 0.1.4
- added support to pass custom width for menu
- expand menu now utilize entire screen height instead of 5 rows.
V 0.1.5
- added support to provide custom column title and disable change of title on row selection.
Set updateColumnTitleOnSelection flag to false. This will disable change of column title on row selection. Note: This will also disable highlight of last selected row item.
menu.updateColumnTitleOnSelection = false
Override following function of JNDropDownMenuDataSource to provide custom title for column
func titleFor(column: Int, menu: JNDropDownMenu) -> String {
return "Column \(column)"
}
Note: If you don't override this, by default it will pick first object of column array as a column title and by default it will update the title of column on row selection.
V 0.1.6
- added support to define arrow position to left or right. Default is right.
Usage
menu.arrowPostion = .Left
Suggestions or feedback?
Feel free to create a pull request, open an issue or find me on Twitter.
*Note that all licence references and agreements mentioned in the JNDropDownMenu README section above
are relevant to that project's source code only.