Skip to content

Animatable, easy to configure, QuickMenu for iOS.

Notifications You must be signed in to change notification settings

mbalajee/UIQuickMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UIQuickMenu

Currently supports only portrait orientation.

Usage

Copy the UIQuickMenu class to your project

// Adding quick menu to view controller

override func viewDidLoad() {
     super.viewDidLoad()

     // Adding quick menu
     if let quickMenu = UIQuickMenu(withMenuOptions: [.QUICK_LAUGH, .QUICK_LOVE, .QUICK_SMILE, .QUICK_THOUGHT]) {
         quickMenu.menuSelectionDelegate = self
         view.addSubview(quickMenu)
     }
 }

Menu Items

UIQuickMenu class contains an Enum, "QuickMenuOptions".

enum QuickMenuOptions {
    
    case QUICK_SMILE
    case QUICK_LAUGH
    case QUICK_LOVE
    case QUICK_THOUGHT
    case QUICK_NONE
    
    var name: String  {
        
        switch self {
        case .QUICK_SMILE:
            return "😀"
            
        case .QUICK_LAUGH:
            return "😂"
            
        case .QUICK_LOVE:
            return "😍"
            
        case .QUICK_THOUGHT:
            return "🤔"
            
        case .QUICK_NONE:
            return ""
        }
    }
}

Adding images

To add image for a menu item, simply give the image name in QuickMenuOptions.

In  "func setupQuickMenuOptions()" replace, setTitle with setImage for a UIButton.

QuickMenu in action

alt text

About

Animatable, easy to configure, QuickMenu for iOS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages