All Projects → younatics → Yndropdownmenu

younatics / Yndropdownmenu

Licence: mit
✨ Awesome Dropdown menu for iOS with Swift 5.0

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Yndropdownmenu

Popmenu
A fully customizable popup style menu for iOS 😎
Stars: ✭ 1,155 (-8.26%)
Mutual labels:  cocoapods, carthage, menu
ContextMenuSwift
A better version of iOS 13 Context Menu
Stars: ✭ 162 (-87.13%)
Mutual labels:  menubar, dropdown, menu
Swiftpagemenu
Customizable Page Tab Menu Controller 👍
Stars: ✭ 233 (-81.49%)
Mutual labels:  cocoapods, carthage, menu
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+169.66%)
Mutual labels:  cocoapods, carthage, menu
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+114.61%)
Mutual labels:  cocoapods, menu, menubar
Sidemenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.
Stars: ✭ 5,267 (+318.35%)
Mutual labels:  cocoapods, carthage, menu
Igldropdownmenu
An iOS drop down menu with pretty animation and easy to customize.
Stars: ✭ 1,218 (-3.26%)
Mutual labels:  menu, dropdown
Memorycache
LRU, type-safe, thread-safe memory cache class in Swift
Stars: ✭ 66 (-94.76%)
Mutual labels:  cocoapods, carthage
Swiftlinkpreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
Stars: ✭ 1,216 (-3.42%)
Mutual labels:  cocoapods, carthage
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (-6.27%)
Mutual labels:  cocoapods, carthage
Cameramanager
Simple Swift class to provide all the configurations you need to create custom camera view in your app
Stars: ✭ 1,130 (-10.25%)
Mutual labels:  cocoapods, carthage
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-94.52%)
Mutual labels:  cocoapods, carthage
Hdwallet
Simple Swift library for creating HD cryptocurrencies wallets and working with crypto Coins/ERC20 tokens.
Stars: ✭ 80 (-93.65%)
Mutual labels:  cocoapods, carthage
Soundable
Soundable allows you to play sounds, single and in sequence, in a very easy way
Stars: ✭ 78 (-93.8%)
Mutual labels:  cocoapods, carthage
Unboxedalamofire
[Deprecated] Alamofire + Unbox: the easiest way to download and decode JSON into swift objects.
Stars: ✭ 65 (-94.84%)
Mutual labels:  cocoapods, carthage
Cluster
Easy Map Annotation Clustering 📍
Stars: ✭ 1,132 (-10.09%)
Mutual labels:  cocoapods, carthage
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (-6.51%)
Mutual labels:  cocoapods, carthage
Hover
🎈 The smartest floating button
Stars: ✭ 81 (-93.57%)
Mutual labels:  cocoapods, carthage
Notificationz
📡 Helping you own NotificationCenter in Swift!
Stars: ✭ 74 (-94.12%)
Mutual labels:  cocoapods, carthage
Magnetic
SpriteKit Floating Bubble Picker (inspired by Apple Music) 🧲
Stars: ✭ 1,252 (-0.56%)
Mutual labels:  cocoapods, carthage

YNDropDownMenu

Awesome Version Carthage Compatible Docs License: MIT Build Status Platform Swift 5.0

Updates

See CHANGELOG for details

Introduction

The eligible dropdown menu for iOS, written in Swift 5, appears dropdown menu to display a view of related items when a user click on the dropdown menu. You can customize dropdown view whatever you like (e.g. UITableView, UICollectionView... etc)

demo demo2

Requirements

YNDropDownMenu written in Swift 5. Compatible with iOS 8.0+

Installation

Cocoapods

YNDropDownMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YNDropDownMenu'

Carthage

github "younatics/YNDropDownMenu"

Usage

import YNDropDownMenu

Init view with frame[CGRect], Views[UIView] and Titles[String]

let view = YNDropDownMenu(frame:frame, dropDownViews: dropDownViews, dropDownViewTitles: ["Apple", "Banana", "Kiwi", "Pear"])
self.addSubview(view)

done!

Inherit YNDropDownView (If you need)

class DropDownView: YNDropDownView {
   // override method to call open & close
    override func dropDownViewOpened() {
        print("dropDownViewOpened")
    }
    
    override func dropDownViewClosed() {
        print("dropDownViewClosed")
    }

    // Hide Menu
    self.hideMenu()

    // Change Menu Title At Index
    self.changeMenu(title: "Changed", at: 1)
    self.changeMenu(title: "Changed", status: .selected, at: 1)

    // Change View At Index 
    self.changeView(view: UIView(), at: 3)

    // Always Selected Menu
    self.alwaysSelected(at: 0)
    self.normalSelected(at: 0)
}

Customize

Show & Hide Menu

view.showAndHideMenu(at:1)

// When view is already opened
view.hideMenu()

Disable & Enable Menu

view.disabledMenu(at: 2)
view.enabledMenu(at: 3)

Always/Normal selected button label

view.alwaysSelected(at: 0)
view.normalSelected(at: 0)

Button Images with 3 situations (normal, selected, disabled)

view.setStatesImages(normalImages: [UIImage(named: "arrow_nor")], selectedImages: [UIImage(named: "arrow_sel")], disabledImages: [UIImage(named: "arrow_dim")])

Label color with 3 situations

view.setLabelColorWhen(normal: UIColor.black, selected: UIColor.blue, disabled: UIColor.gray)

Label font with 3 situations

view.setLabelFontWhen(normal: UIFont.systemFont(ofSize: 12), selected: UIFont.boldSystemFont(ofSize: 12), disabled: UIFont.systemFont(ofSize: 12))

BlurEffectView

// Enadbled or Disabled first (Default true)
view.backgroundBlurEnabled = false

// Use this line if you want to change UIBlurEffectStyle
view.blurEffectStyle = .light

// Or customize blurEffectView(UIView)
let backgroundView = UIView()
backgroundView.backgroundColor = UIColor.black
view.blurEffectView = backgroundView

// Animation end alpha
view.blurEffectViewAlpha = 0.7

Animation duration

view.showMenuDuration = 0.5
view.hideMenuDuration = 0.3

Animation velocity, damping

view.showMenuSpringVelocity = 0.5
view.showMenuSpringWithDamping = 0.8

view.hideMenuSpringVelocity = 0.9
view.hideMenuSpringWithDamping = 0.8

Change Menu Title At Index

view.changeMenu(title: "Changed", at: 1)
view.changeMenu(title: "Changed", status: .selected, at: 1)

Change View At Index

view.changeView(view: UIView(), at: 3)

Change Bottom Line

view.bottomLine.backgroundColor = UIColor.black
view.bottomLine.isHidden = false

Deprecated

extension YNDropDownMenu {
    @available(*, deprecated, message: "use init(frame: CGRect, dropDownViews: [UIView], dropDownViewTitles: [String]) instead")
    public init(frame: CGRect, YNDropDownViews: [YNDropDownView], dropDownViewTitles: [String])

    @available(*, deprecated, message: "use alwaysSelected(at index: Int) instead")
    open func alwaysSelectedAt(index: Int) {
        self.alwaysSelected(at: index)
    }
    
    @available(*, deprecated, message: "use disabledMenu(at index: Int) instead")
    open func disabledMenuAt(index: Int) {
        self.disabledMenu(at: index)
    }
    
    @available(*, deprecated, message: "use enabledMenu(at index: Int) instead")
    open func enabledMenuAt(index: Int) {
        self.enabledMenu(at: index)
    }

    @available(*, deprecated, message: "use showAndHideMenu(at index: Int) instead")
    open func showAndHideMenuAt(index: Int) {
        self.showAndHideMenu(at: index)
    }
}

extension YNDropDownView {
    @available(*, deprecated, message: "use changeMenu(title: String, at index: Int) instead")
    open func changeMenuTitleAt(index: Int, title: String) {
        self.delegate?.changeMenu(title: title, at: index)
    }
}

References

Please tell me or make pull request if you use this library in your application :)

@zigbang

MotionBook

Author

younatics Twitter

Thanks to

jegumhon

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].