All Projects → liufengting → Ftpopovermenu

liufengting / Ftpopovermenu

Licence: mit
FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.

Projects that are alternatives of or similar to Ftpopovermenu

PopOverAlert
PopOverAlert is a PopOver style alert view.
Stars: ✭ 56 (-94.33%)
Mutual labels:  popover, menu, pop
Ftpopovermenu swift
FTPopOverMenu_Swift, swift version of FTPopOverMenu. FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.
Stars: ✭ 326 (-67%)
Mutual labels:  pop, menu, popover
vue-burger-button
🍔 vue-burger-button is a functional component, which is faster than a regular component, and is pretty small (JS min+gzip is lower than 700b and CSS min+gzip is lower than 400b).
Stars: ✭ 41 (-95.85%)
Mutual labels:  button, menu
Dragfloatingactionbutton
一个可以随处拖曳FloatingActionButton,边缘自动吸附,可设置按钮悬浮透明度,拖曳避免阻挡界面视图无法查看。
Stars: ✭ 258 (-73.89%)
Mutual labels:  menu, button
Efcountinglabel
Adds animated counting support to UILabel.
Stars: ✭ 311 (-68.52%)
Mutual labels:  cocoapods, button
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+173.48%)
Mutual labels:  cocoapods, menu
Jxpopupview
一个轻量级的自定义视图弹出框架
Stars: ✭ 117 (-88.16%)
Mutual labels:  pop, popover
SPStorkController
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,515 (+154.55%)
Mutual labels:  popover, pop
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+243.62%)
Mutual labels:  cocoapods, menu
Pmcalendar
Yet another calendar component for iOS. Compatible with iOS 4.0 (iPhone & iPad) and higher. Supports presenting as a popover and very flexible UI tuning. Default theme is inspired by https://github.com/ocrickard/OCCalendar
Stars: ✭ 383 (-61.23%)
Mutual labels:  cocoapods, popover
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 (+433.1%)
Mutual labels:  cocoapods, menu
Swiftpagemenu
Customizable Page Tab Menu Controller 👍
Stars: ✭ 233 (-76.42%)
Mutual labels:  cocoapods, menu
Ccnstatusitem
CCNStatusItem is a subclass of NSObject to act as a custom view for NSStatusItem. It supports a customizable statusItemWindow handling any viewController for presenting the content.
Stars: ✭ 223 (-77.43%)
Mutual labels:  cocoapods, popover
Spstorkcontroller
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,494 (+152.43%)
Mutual labels:  pop, popover
Emspinnerbutton
UIButton sublcass with loading animation
Stars: ✭ 117 (-88.16%)
Mutual labels:  cocoapods, button
Yndropdownmenu
✨ Awesome Dropdown menu for iOS with Swift 5.0
Stars: ✭ 1,259 (+27.43%)
Mutual labels:  cocoapods, menu
Popmenu
A fully customizable popup style menu for iOS 😎
Stars: ✭ 1,155 (+16.9%)
Mutual labels:  cocoapods, menu
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (+19.13%)
Mutual labels:  cocoapods, popover
Ybpopupmenu
快速集成popupMenu
Stars: ✭ 816 (-17.41%)
Mutual labels:  pop, menu
Popover
一款优雅易用的类似QQ和微信消息页面的右上角微型菜单弹窗
Stars: ✭ 732 (-25.91%)
Mutual labels:  menu, popover

FTPopOverMenu

FTPopOverMenu

Twitter GitHub license Version Codebeat badge Download CocoaPods CocoaPods CI Status GitHub stars Gitter

FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use, supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect. Simplest APIs, enable you to change the style in one line of code.

menu array supports following context:

  • image name (NSString, only main bundle),
  • image (UIImage),
  • image remote URL string (NSString),
  • image remote URL (NSURL),
  • model (FTPopOverMenuModel, select state support)

⚠️ Big API Change from 1.3.6 to 2.0.0 (See CHANGELOG for more info)

  • supports separated configuration.
  • change 'tintColor' to 'backgroundColor'

About Swift Version

FTPopOverMenu_Swift is now published. Take a look at it now. The swift version has same APIs with this OC version.

ScreenShots

screenshots

Recently UrbanHooker added round arrow support, I changed a little bit.

screenshots

Installation

Manually

  • clone this repo.
  • Simply drop the '/FTPopOverMenu' folder into your project.
  • import 'FTPopOverMenu.h'

CocoaPods

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

pod 'FTPopOverMenu'

Usage

Customize

Do any of the following settings to set the style (Only set the ones you want to change) before showing.

    FTPopOverMenuConfiguration *configuration = [FTPopOverMenuConfiguration defaultConfiguration];
    configuration.menuRowHeight = ...
    configuration.menuWidth = ...
    configuration.textColor = ...
    configuration.textFont = ...
    configuration.tintColor = ...
    configuration.borderColor = ...
    configuration.borderWidth = ...
    configuration.textAlignment = ...
    configuration.ignoreImageOriginalColor = ...;// set 'ignoreImageOriginalColor' to YES, images color will be same as textColor
    configuration.allowRoundedArrow = ...// Default is 'NO', if sets to 'YES', the arrow will be drawn with round corner.
    configuration.separatorColor = ...
    configuration.shadowColor = ... // Default is black
    configuration.shadowOpacity = ... // Default is 0 - choose anything between 0 to 1 to show actual shadow, e.g. 0.2
    configuration.shadowRadius = ... // Default is 5
    configuration.shadowOffsetX = ...
    configuration.shadowOffsetY = ...

setTintColor, default is gray color. deprecated after 1.2.0

    [FTPopOverMenu setTintColor:[UIColor redColor]];

setTextColor, default is white color. deprecated after 1.2.0

    [FTPopOverMenu setTextColor:[UIColor blackColor]];

setPreferedWidth, default is 120, should not be less than 50. deprecated after 1.2.0

    [FTPopOverMenu setPreferedWidth:200];

From SenderView, Menu Without Images.

    [FTPopOverMenu showForSender:sender
                        withMenu:@[@"MenuOne",@"MenuTwo",@"MenuThr"]
                       doneBlock:^(NSInteger selectedIndex) {
                           
                       } dismissBlock:^{
                          
                       }];

From SenderView, Menu With Images.

    [FTPopOverMenu showForSender:sender
                        withMenu:@[@"MenuOne",@"MenuTwo",@"MenuThr"]
                  imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
                       doneBlock:^(NSInteger selectedIndex) {
                           
                       } dismissBlock:^{
                          
                       }];

From SenderView, Menu With Images, custom configuration.

    [FTPopOverMenu showForSender:sender
                        withMenu:@[@"MenuOne",@"MenuTwo",@"MenuThr"]
                  imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
                   configuration:customConfiguration
                       doneBlock:^(NSInteger selectedIndex) {
                           
                       } dismissBlock:^{
                          
                       }];

From SenderFrame/NavigationItem, Menu Without Images.

    [FTPopOverMenu showFromSenderFrame:CGRectMake(self.view.frame.size.width - 40, 20, 40, 40)
                              withMenu:@[@"123",@"234",@"345"]
                             doneBlock:^(NSInteger selectedIndex) {
                                 
                             } dismissBlock:^{
                                 
                             }];

From SenderFrame/NavigationItem, Menu With Images.

    [FTPopOverMenu showFromSenderFrame:CGRectMake(self.view.frame.size.width - 40, 20, 40, 40)
                              withMenu:@[@"123",@"234",@"345"]
                        imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
                             doneBlock:^(NSInteger selectedIndex) {
                                 
                             } dismissBlock:^{
                                 
                             }];

From SenderFrame/NavigationItem, Menu With Images, custom configuration.

    [FTPopOverMenu showFromSenderFrame:CGRectMake(self.view.frame.size.width - 40, 20, 40, 40)
                              withMenu:@[@"123",@"234",@"345"]
                        imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
	                     configuration:customConfiguration
                             doneBlock:^(NSInteger selectedIndex) {
                                 
                             } dismissBlock:^{
                                 
                             }];

From barButtonItems .

  • First: add action with event to you barButtonItems
    [self.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleDone target:self action:@selector(onNavButtonTapped:event:)]];
  • Second: implement the action, also supports custom configuration.
-(void)onNavButtonTapped:(UIBarButtonItem *)sender event:(UIEvent *)event
{

    [FTPopOverMenu showFromEvent:event
                        withMenu:@[@"123",@"234",@"345"]
                  imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
                  configuration:customConfiguration
                       doneBlock:^(NSInteger selectedIndex) {
                           
                       } dismissBlock:^{
                           
                       }];
}

CHANGELOG

CHANGELOG

More

  • Logo Designed by @Tobaloidee
  • Images in the demo from https://www.iconfinder.com/iconsets/pokemon-go.
  • If you like it, or maybe wanna use it in your own projects, please give me a star.
  • Looking for another way of doing this? Take a look at my another FTPopMenu at here. It was another way of showing pop over menus, which is wrapped from UIPopoverViewController, and more genetic and more good-looking. Feel free to try it.

License

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