A fully customizable popup style menu for iOS 😎

Overview

Guide

Check out the documentation and guides for details on how to use. (Available languages:)

What's a better way to know what PopMenu offers than some live action images? Here's to show you what you can do with PopMenu:

💪🏻 Contribute

Thank you if you are interested in contributing to the project, I appreaciate it!

Before committing any changes, please make sure to read the Contribution Guidelines first, thank you!

📗 Check Documentation

Documentation is available at https://popmenu.calic.dev/

[Join Our Slack Channel](https://join.slack.com/t/newpopmenu/shared_invite/enQtMzQ4OTExMzE0OTM1LWFhM2IxYmYxOGZmMTgzNjQxMWRiNzUyZmYwN2M4ZmQ2YWYxY2VhNWI3MDlmM2JhOTM5NjAwODlmNjQzMmVlODM)

Issues
  • Unwanted Results via PopMenuManager

    Unwanted Results via PopMenuManager

    ✍🏻 Issue Description

    There will be some unwanted carryovers in a result of using the PopMenuManager to construct the menu

    bug 
    opened by CaliCastle 9
  • PopMenuDefaultAction.iconWidthHeight is a static property

    PopMenuDefaultAction.iconWidthHeight is a static property

    This is a cool popup menu, I like it, and I will use it in my project. But when I add my icon image(size 18 pixel) to PopMenuDefaultAction, It looks ugly. The image is much bigger than I expected. So I looked at the source code and found a problem.

    PopMenuDefaultAction.iconWidthHeight is a static property, I think it should be automatically calculated.

    NSLayoutConstraint.activate([
                    iconImageView.widthAnchor.constraint(equalToConstant: PopMenuDefaultAction.iconWidthHeight),
                    iconImageView.heightAnchor.constraint(equalTo: iconImageView.widthAnchor),
                    iconImageView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: PopMenuDefaultAction.iconLeftPadding),
                    iconImageView.centerYAnchor.constraint(equalTo: view.centerYAnchor)
                ])
    

    iconImageView.widthAnchor and iconImageView.heightAnchor should be automatically calculated based on the size of the image.

    Now I am using a custom PopMenuAction named PopMenuCustomAction and modifying PopMenuDefaultAction.iconWidthHeight to 18 to resolve my problem.

    Please fix this issue, Thanks.

    enhancement 
    opened by shalyf 4
  • Content scrollable

    Content scrollable

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    Is it possible to make actions scrollable inside menu? I mean, what happens if I have many many actions?

    💻 Environment

    • iOS Version: [iOS VERSION]
    • Xcode Version: [XCODE VERSION]
    • Device(s): [INSERT DEVICE(S) HERE]
    • Simulator?: [YES] or [NO]
    enhancement 
    opened by quetool 4
  • Not support landscape

    Not support landscape

    First of all thank you for your contribution, I have a pimping claim: that be hope it can support the landscape. Thanks! ^-^

    question 
    opened by LayChan 4
  • Add separator for each action item

    Add separator for each action item

    This PR is based on Issue #5

    enhancement 
    opened by lukaswuerzburger 3
  • Error While Archive Process

    Error While Archive Process

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    💻 Environment

    • iOS Version: [12]
    • Xcode Version: [10]
    • Device(s): [INSERT DEVICE(S) HERE]
    • Simulator?: [YES] or [NO]
    opened by lendra85 3
  • [UI Enhancement] iconImageView renderingMode configurable to alwaysOriginal

    [UI Enhancement] iconImageView renderingMode configurable to alwaysOriginal

    I want to support colored image in the menu, so please give a variable to manage the renderingMode of iconImageView.

    enhancement 
    opened by kokitang 3
  • Error when importing in a Swift Project

    Error when importing in a Swift Project

    Errors when importing the pod in a swift project, I had to manually fix your Pod

    PopMenu.m:11:9: error: 'XHRealTimeBlur.h' file not found with <angled> include; use "quotes" instead
    PopMenu.m:11:9: error: 'XHRealTimeBlur.h' file not found with <angled> include; use "quotes" instead
    MenuButton.m:10:9: error: 'POP.h' file not found with <angled> include; use "quotes" instead
    #import <POP.h>
    

    -> please remove <> and replace with ""

    opened by altagir 3
  • can't set PopMenuActionColor

    can't set PopMenuActionColor

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    this code is invalid since actionColor is an object and can't be set manager.popMenuAppearance.popMenuColor.actionColor = .green

    💻 Environment

    • iOS Version: [iOS VERSION]
    • Xcode Version: [XCODE VERSION] 10.1
    • Device(s): [INSERT DEVICE(S) HERE]
    • Simulator?: ☑️
    opened by galblank 2
  • How to popmenu didDeselect action ?

    How to popmenu didDeselect action ?

    I'm open agin popmenu it's show me previous select action. How to diddeselect popmenu action ?

    invalid 
    opened by DGP13 2
  • Add Feature For Border Color

    Add Feature For Border Color

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    💻 Environment

    • iOS Version: [iOS VERSION]
    • Xcode Version: [XCODE VERSION]
    • Device(s): [INSERT DEVICE(S) HERE]
    • Simulator?: ☑️ or ❌
    opened by dhvl1729 0
  • Fix Xcode 13 builds

    Fix Xcode 13 builds

    Checklist

    • [x] I've tested my changes.
    • [x] I've read the Contribution Guidelines.
    • [x] I've updated the documentation if necessary.

    Motivation and Context

    Even though docs say not to update minimum target; with Xcode 13, builds are failing due to @available attribute on Haptic enum. Issue seen below. #67 #66

    Description

    • updated deployment target on project to iOS 10.0
    • updated podspec to reflect this change
    • removed @available attribute on haptic file
    opened by jopache 1
  • Xcode 13.0 Enum cases with associated values cannot be marked potentially unavailable with '@available'

    Xcode 13.0 Enum cases with associated values cannot be marked potentially unavailable with '@available'

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    💻 Environment

    • iOS Version: [iOS VERSION]
    • Xcode Version: [XCODE VERSION]
    • Device(s): [INSERT DEVICE(S) HERE]
    • Simulator?: ☑️ or ❌
    opened by nobut 5
  • Xcode 13 compatibility issue - Haptics.swift

    Xcode 13 compatibility issue - Haptics.swift

    ✍🏻 Issue Description

    Errors in Haptics.swift with changes in Xcode 13.

    specifically: Enum cases with associated values cannot be marked potentially unavailable with '@available'

    Screen Shot 2021-07-23 at 11 18 38 AM

    💻 Environment

    • Xcode Version: Xcode Version 13.0 beta 3 (13A5192j)
    opened by jminutaglio 1
  • 可以支持icon 放右边吗

    可以支持icon 放右边吗

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    可以支持icon 放右边吗

    opened by roycehe 0
  • 锚定一个视图后设备旋转后需要跟随

    锚定一个视图后设备旋转后需要跟随

    在指定视图位置弹出,当设备旋转后,需要跟着调整位置。

    opened by huanglins 0
  • Solid Background Colors Have Alpha Value of 0.9

    Solid Background Colors Have Alpha Value of 0.9

    Solid background colors are used with an alpha value of 0.9 which gives incorrect color in final result. Especially visible when using white background color.

    Issue occurs in PopMenuViewController.swift:278

    contentView.backgroundColor = colors.first?.withAlphaComponent(0.9)

    opened by erginbilgin 0
  • cornerRadius of PopMenuDefaultAction doesnt do anything

    cornerRadius of PopMenuDefaultAction doesnt do anything

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    Basically Im instantiating a PopMenuDefaultAction and then immediately setting it's cornerRadius, which has no effect to the default one.

    @IBAction func btnLibraryTouchUpInside(_ sender: UIButton) {
            if(self.g8.recording == true){ return }
            let libVideoAct = PopMenuDefaultAction(title: "VIDEOS", image: #imageLiteral(resourceName: "btnBtnLoadVideoXxs"), color: nil) { (action) in
                self.showPhotoLibraryBrowser(type: kUTTypeMovie)
            }
            libVideoAct.iconWidthHeight = 40.0
            libVideoAct.cornerRadius = 0.0
            
            let libPhotosAct = PopMenuDefaultAction(title: "PHOTOS", image: #imageLiteral(resourceName: "btnBtnLoadImgXxs"), color: nil) { (action) in
                self.showPhotoLibraryBrowser(type: kUTTypeImage)
            }
            
            libPhotosAct.iconWidthHeight = 40.0
            libPhotosAct.cornerRadius = 0.0
            let actions = [libVideoAct, libPhotosAct]
            // Pass the UIView in init
            let menu = PopMenuViewController(sourceView: sender, actions: actions)
            let sepColor = UIColor(red: 35/255, green: 35/255, blue: 35/255, alpha: 1.0).cgColor
            let bgMenuColor = UIColor(red: 54/255, green: 54/255, blue: 54/255, alpha: 1.0).cgColor
            menu.appearance.popMenuItemSeparator = .fill(Color(cgColor: sepColor), height: 2.0)
            let bgColor = PopMenuColor.configure(background: PopMenuActionBackgroundColor.solid(fill: Color(cgColor: bgMenuColor)), action: PopMenuColor.default().actionColor)
            
            menu.appearance.popMenuColor = bgColor
            menu.appearance.popMenuBackgroundStyle = .none()
            menu.appearance.popMenuCornerRadius = 4.0
            menu.appearance.popMenuActionHeight = 44
            menu.appearance.popMenuFont = UIFont(name: ".sfuitext-bold", size: 8.0)!
            
            
            let newPosition = menu.contentFrame.offsetBy(dx: -15, dy: -45)
            menu.contentFrame = newPosition.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 26.3))
            present(menu, animated: true, completion: nil)
        }
    

    image

    💻 Environment

    • iOS Version: 13.5.1
    • Xcode Version: 12.0
    • Device(s): iPhone XS Max
    • Simulator?: I dont know, I dont use it.
    opened by omarojo 0
  • 样式设置失效及坐标微调问题

    样式设置失效及坐标微调问题

    ✔️ Issue Checklist

    ✍🏻 Issue Description

    因为弹出的菜单挡住了按钮,尝试改变y坐标作一个偏移 menu.contentFrame.origin.y -= 50

    可以实现,但放在这行代码之后的样式设置就失效了,例如

    menu.appearance.popMenuCornerRadius = 2
    menu.appearance.popMenuColor.backgroundColor = .solid(fill: .purple)
    

    通过测试menu.contentFrame.origin.y -= 50必须放在样式设置之后。

    请问还有更好的办法来微调菜单的位置吗?谢谢

    💻 Environment

    • iOS Version: [13.3]
    • Xcode Version: [11.3.1]
    • Device(s): [iPhone 11]
    • Simulator?: ☑️
    opened by jdleung 0
Releases(v2.1.2)
  • v2.1.2(Jan 5, 2019)

    • Fixed unwanted carryover selection highlight state #19
    • Added dedicated toggle for whether to use PopMenuManager or PopMenuViewController to present menus
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Sep 3, 2018)

    Fixed:

    • Content is now scrollable when there's more than 6 actions (customizable) #10
    • Each action's icon image width height sizing is now configurable, #9
    • Each action's icon image is now customizable to set different rendering mode (.alwaysOriginal, .alwaysTemplate), #8
    • Fixed incorrect views rendering when device orientation changes, thanks to @Shaun Farrel
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Sep 3, 2018)

    Fixed:

    • Content is now scrollable when there's more than 6 actions (customizable) #10
    • Each action's icon image width height sizing is now configurable, #9
    • Each action's icon image is now customizable to set different rendering mode (.alwaysOriginal, .alwaysTemplate), #8
    • Fixed incorrect views rendering when device orientation changes, thanks to @Shaun Farrel
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Jun 8, 2018)

  • v1.1.2(Apr 25, 2018)

  • v1.1.1(Apr 25, 2018)

  • v1.1.0(Apr 24, 2018)

    Changelog:

    • Removed the process of setting barButtonItem manually
    • Add shouldEnableHaptics option for PopMenuViewController
    • Change library module name to PopMenu, instead of NewPopMenu for CocoaPods
    • Rename handler to didSelect for each action
    • Rename dismissalHandler to didDismiss
    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Apr 17, 2018)

    Changes:

    • Fixed calling manager.addAction() will crash
    • Speed up dismissal duration from 0.143s to 0.098s
    • Added dismissalHandler for PopMenuViewController
    • Added handler for each action when initializing
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Apr 17, 2018)

  • v1.0.0(Apr 17, 2018)

Owner
Cali Castle
Left brain Engineer and right brain Designer.
Cali Castle
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift

CDAlertView is highly customizable alert popup written in Swift. Usage is similar to UIAlertController. Screenshots Animations Usage Basic usage witho

Candost Dagdeviren 1.1k Jan 3, 2022
Fully customizable and extensible action sheet controller written in Swift

XLActionController By XMARTLABS. XLActionController is an extensible library to quickly create any custom action sheet controller. Examples The action

xmartlabs 3.2k Jan 4, 2022
AlertView, Ios popup window, A pop-up framework, Can be simple and convenient to join your project. IOS 提示框,IOS弹框,IOS弹窗

RAlertView AlertView A pop-up framework, Can be simple and convenient to join your project. Warning content Installation Depend on the project Masonry

杜耀辉 70 Sep 1, 2021
A simple style messages/notifications, in Swift.

Demo Example To show notifications use the following code: self.showMessage("Something success", type: .success) To display a notice on a view: view.s

Gesen 680 Jan 14, 2022
[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.

JDStatusBarNotification Show messages on top of the status bar. Customizable colors, font and animation. Supports progress display and can show an act

Markus Emrich 3.8k Jan 3, 2022
FCAlertView is a Flat Customizable AlertView for iOS (Swift)

FCAlertView FCAlertView is a Flat Customizable AlertView, written in Swift [![CI Status](http://img.shields.io/travis/Nima Tahami/FCAlertView.svg?styl

Kris Penney 113 Aug 20, 2021
FCAlertView is a Flat Customizable AlertView for iOS (Written in Objective C)

FCAlertView FCAlertView is a Flat Customizable AlertView, written in Objective C Quick Links 1. Swift 2. Installation 3. Example App 4. Adding FCAlert

Nima Tahami 793 Dec 6, 2021
The easiest way to display highly customizable in app notification banners in iOS

Written in Swift 5 NotificationBanner is an extremely customizable and lightweight library that makes the task of displaying in app notification banne

Dalton Hinterscher 4.3k Jan 2, 2022
In-app notification in Swift, with customizable buttons and input text field.

Notie Undistracted in-app notification in Swift, with added buttons and input box. Installation CocoaPods To integrate Notie into your Xcode project u

Thi Doãn 85 Aug 8, 2020
OEANotification is a customizable notification view framework

OEANotification OEANotification is an iOS library which provides to create notifications and customize them easily. You can create notifications with

Ömer Aslan 19 Jan 30, 2021
Customizable simple Alert and simple ActionSheet for Swift

SimpleAlert It is simple and easily customizable alert. Can be used as UIAlertController. Appetize's Demo Requirements Swift 5.0 iOS 9.0 or later How

Kyohei Ito 388 Jan 9, 2022
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

Paolo Musolino 2.4k Jan 6, 2022
A customizable framework to create draggable views

CFNotify CFNotify is written in Swift. Using UIKit Dynamics as animator. It can make ANY UIView object draggable and throwable. This library mainly us

Johnny Tsoi 488 Dec 23, 2021
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.

SwiftEntryKit ?? Donations can be made here. Table of Contents Overview Features Example Project Example Project Installation Presets Playground Requi

Daniel Huri 5.7k Jan 14, 2022
Live animated Alert View for iOS written in Swift

Sweet Alert iOS Beautiful Animated custom Alert View inspired from javascript library SweetAlert. Written in Swift this SweetAlertView can be used in

Sahil 2k Dec 13, 2021
Highly configurable iOS Alert Views with custom content views

NYAlertViewController NYAlertViewController is a replacement for UIAlertController/UIAlertView with support for content views and UI customization. Fe

Nealon Young 611 Jan 5, 2022
A lightweight dropdown notification for iOS 7+, in Swift.

BRYXBanner A lightweight dropdown banner for iOS 7+. Usage Import BRYXBanner import BRYXBanner Create a banner using the designated initializer. let b

Bryx, Inc 986 Nov 25, 2021
iOS / Objective C: an extremely simple UIAlertView alternative

RKDropdownAlert an extremely simple (and customizeable) alert alternative based on Facebook's app Slingshot, and inspiration from SVProgressHUD (yes,

Richard Kim 1.5k Jan 4, 2022
A modern iOS toast view that can fit your notification needs

CRToast CRToast is a library that allows you to easily create notifications that appear on top of or by pushing out the status bar or navigation bar.

Collin Ruffenach 4.2k Jan 5, 2022