All Projects → KarimEbrahemAbdelaziz → Swiftymenu

KarimEbrahemAbdelaziz / Swiftymenu

Licence: mit
Simple and Elegant Drop down menu for iOS 🔥💥

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftymenu

Kydrawercontroller
Side Drawer Navigation Controller similar to Android
Stars: ✭ 632 (+77.53%)
Mutual labels:  cocoapods, storyboard
Keyboardhidemanager
Codeless manager to hide keyboard by tapping on views for iOS written in Swift
Stars: ✭ 57 (-83.99%)
Mutual labels:  cocoapods, storyboard
Forceblur
ForceBlur Animation for iOS Messaging Apps
Stars: ✭ 666 (+87.08%)
Mutual labels:  cocoapods, storyboard
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (+22.47%)
Mutual labels:  cocoapods, storyboard
Chipagecontrol
A set of cool animated page controls written in Swift to replace boring UIPageControl. Mady by @ChiliLabs - https://chililabs.io
Stars: ✭ 2,909 (+717.13%)
Mutual labels:  cocoapods, storyboard
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 (+1379.49%)
Mutual labels:  cocoapods, storyboard
Tangramkit
TangramKit is a powerful iOS UI framework implemented by Swift. It integrates the functions with Android layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView
Stars: ✭ 984 (+176.4%)
Mutual labels:  cocoapods, storyboard
Sidemenu
An interactive iOS side menu with rich features.
Stars: ✭ 442 (+24.16%)
Mutual labels:  cocoapods, storyboard
Swiftcolorgen
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors
Stars: ✭ 152 (-57.3%)
Mutual labels:  cocoapods, storyboard
Pscarouselview
A drop-in carousel view. Most of Apps put it in their first screen.
Stars: ✭ 149 (-58.15%)
Mutual labels:  cocoapods, storyboard
Mylinearlayout
MyLayout is a powerful iOS UI framework implemented by Objective-C. It integrates the functions with Android Layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,PathLayout,GridLayout,LayoutSizeClass to build your App 自动布局 UIView UITab…
Stars: ✭ 4,152 (+1066.29%)
Mutual labels:  cocoapods, storyboard
KDRearrangeableCollectionViewFlowLayout
A Drag and Rearrange UICollectionView through its layout
Stars: ✭ 73 (-79.49%)
Mutual labels:  storyboard, drop
Cyltabbarcontroller
[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
Stars: ✭ 6,605 (+1755.34%)
Mutual labels:  cocoapods, storyboard
Switch
💊 An iOS switch control implemented in Swift with full Interface Builder support
Stars: ✭ 132 (-62.92%)
Mutual labels:  cocoapods, storyboard
Localize
Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings.
Stars: ✭ 253 (-28.93%)
Mutual labels:  cocoapods, storyboard
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+793.82%)
Mutual labels:  cocoapods, storyboard
Easyrealm
EasyRealm is a micro-framework that helps you use Realm.
Stars: ✭ 320 (-10.11%)
Mutual labels:  cocoapods
Swift5 Module Template
An opinionated starting point for awesome, reusable Swift 5 modules
Stars: ✭ 331 (-7.02%)
Mutual labels:  cocoapods
Microfeatures Guidelines
📦📝 uFeatures guidelines
Stars: ✭ 315 (-11.52%)
Mutual labels:  cocoapods
Misterfusion
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
Stars: ✭ 314 (-11.8%)
Mutual labels:  cocoapods

SwiftyMenu

Cocoapod Version MIT License
Facebook: @KarimEbrahemAbdelaziz Twitter: @k_ebrahem_

SwiftyMenu is simple yet powerfull drop down menu component for iOS. It allow you to have drop down menu that doesn't appear over your views, which give you awesome user experience.

Screenshots

Requirements

  • Xcode 10.2+
  • Swift 5+
  • iOS 10+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SwiftyMenu into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SwiftyMenu', '~> 0.6.5'

Usage

Storyboard

We are supporting Generic Data Source, all you have to do is conforming to our Generic Protocol on which type you want to add to the menu:

// Example on String. You can change it to what ever type you want ;)
// String extension to conform SwiftyMenuDisplayable Protocl
extension String: SwiftyMenuDisplayable {
    public var displayableValue: String {
        return self
    }
    
    public var retrivableValue: Any {
        return self
    }
}

Then setup your view controller:

// Connect view in storyboard with you outlet
@IBOutlet private weak var dropDownMenu: SwiftyMenu!

// Define your Generic items array)
private let items: [SwiftyMenuDisplayable] = ["Option 1", "Option 2", "Option 3", "Option 4"]

// Assign the component that implement SwiftyMenuDelegate to SwiftyMenu component
dropDownMenu.delegate = self

// Give array of items to SwiftyMenu
dropDownMenu.items = items

Then implement SwiftyMenuDelegate:

extension ViewController: SwiftyMenuDelegate {
    // Get selected option from SwiftyMenu
    func swiftyMenu(_ swiftyMenu: SwiftyMenu, didSelectItem item: SwiftyMenuDisplayable, atIndex index: Int) {
        print("Selected item: \(item), at index: \(index)")
    }
    
    // SwiftyMenu drop down menu will expand
    func swiftyMenu(willExpand swiftyMenu: SwiftyMenu) {
        print("SwiftyMenu willExpand.")
    }

    // SwiftyMenu drop down menu did expand
    func swiftyMenu(didExpand swiftyMenu: SwiftyMenu) {
        print("SwiftyMenu didExpand.")
    }

    // SwiftyMenu drop down menu will collapse
    func swiftyMenu(willCollapse swiftyMenu: SwiftyMenu) {
        print("SwiftyMenu willCollapse.")
    }

    // SwiftyMenu drop down menu did collapse
    func swiftyMenu(didCollapse swiftyMenu: SwiftyMenu) {
        print("SwiftyMenu didCollapse.")
    }
}

Also you can use callbacks to know what happen:

// Support different callbacks for different events
dropDownMenu.didExpand = {
    print("SwiftyMenu Expanded!")
}

dropDownMenu.didCollapse = {
    print("SwiftyMeny Collapsed")
}

dropDown.didSelectItem = { menu, item, index in
    print("\(item) at index: \(index)")
}

CustomizeUI

You can configure SwiftyMenu from Storyboard or Code as following:

// Change option's row height (default 35)
dropDownMenu.rowHeight = 35

// Change option's drop down menu height 
// default is 0, which make drop down height = number of options * rowHeight
dropDownMenu.listHeight = 150

// Change drop down menu border width
dropDownMenu.borderWidth = 1.0

// Change drop down menu scroll behavior 
dropDownMenu.scrollingEnabled = false

// Change drop down menu default colors
dropDownMenu.borderColor = .black
dropDownMenu.itemTextColor = .red
dropDownMenu.placeHolderColor = .blue
dropDownMenu.menuHeaderBackgroundColor = .lightGray
dropDownMenu.rowBackgroundColor = .orange
dropDown.separatorColor = .white

// Change drop down menu default expand and collapse animation
dropDownMenu.expandingAnimationStyle = .spring(level: .low)
dropDownMenu.expandingDuration = 0.5
dropDownMenu.collapsingAnimationStyle = .linear
dropDownMenu.collapsingDuration = 0.5

TODO

  • [x] Automate release new version to Cocoapods from Github Actions.
  • [x] Add CHANGELOG file for the project.
  • [ ] Allow custom header and options cells.
  • [ ] Allow different interactions to dismiss SwiftyMenu.
  • [ ] Allow to customize the default seperator.
  • [x] Support Generic DataSource.
  • [x] Support multi selection in SwiftMenu 🔥.
  • [x] Support multi SwiftyMenu in one screen.
  • [x] Support stack view and add example.
  • [x] Support call backs and delegation.
  • [x] Support different types of Animations.
  • [x] Add different customization to colors for default cells.

And much more ideas to make it solid drop down menu for iOS projects 😎💪🏻

Android

Author

Karim Ebrahem, [email protected]

License

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

Credits

You can find me on Twitter @k_ebrahem_.

It will be updated when necessary and fixes will be done as soon as discovered to keep it up to date.

Enjoy!

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].