All Projects → Yalantis → Context Menu.ios

Yalantis / Context Menu.ios

Licence: apache-2.0
You can easily add awesome animated context menu to your app.

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Context Menu.ios

JonContextMenu
A beautiful and minimalist arc menu like the Pinterest one, written in Swift
Stars: ✭ 60 (-96.76%)
Mutual labels:  menu, contextmenu, context-menu
vue3-context-menu
A very simple context menu component for Vue3 一个简洁美观简单的Vue3右键菜单组件
Stars: ✭ 74 (-96.01%)
Mutual labels:  menu, contextmenu, context-menu
ContextMenuSwift
A better version of iOS 13 Context Menu
Stars: ✭ 162 (-91.26%)
Mutual labels:  menu, contextmenu, context-menu
Ngcontextmenu
Handcraft your very own context menus for a richer UX!
Stars: ✭ 81 (-95.63%)
Mutual labels:  menu, contextmenu, context-menu
ShellAnything
ShellAnything is a C++ open-source software which allow one to easily customize and add new options to *Windows Explorer* context menu. Define specific actions when a user right-click on a file or a directory.
Stars: ✭ 103 (-94.44%)
Mutual labels:  contextmenu, context-menu
Pull To Refresh.rentals Ios
This project aims to provide a simple and customizable pull to refresh implementation. Made in Yalantis
Stars: ✭ 2,171 (+17.1%)
Mutual labels:  customization, yalantis
ember-right-click-menu
An easy and flexible addon to add context menus anywhere in your application
Stars: ✭ 14 (-99.24%)
Mutual labels:  menu, context-menu
ng2-right-click-menu
Right click context menu for Angular 2+
Stars: ✭ 51 (-97.25%)
Mutual labels:  contextmenu, context-menu
ctxmenu
Tiny and customizable context menu generator
Stars: ✭ 20 (-98.92%)
Mutual labels:  contextmenu, context-menu
xMenuTools
Extended context menu tools for Windows
Stars: ✭ 56 (-96.98%)
Mutual labels:  menu, context-menu
Open in Windows Terminal
No description or website provided.
Stars: ✭ 24 (-98.71%)
Mutual labels:  contextmenu, context-menu
React Menu
React component for building accessible menu, dropdown, submenu, context menu and more.
Stars: ✭ 237 (-87.22%)
Mutual labels:  menu, contextmenu
Vue Menu
Menu/Contextmenu Component for vue2
Stars: ✭ 227 (-87.76%)
Mutual labels:  menu, contextmenu
VirusTotalScanner
Scan suspicious applications with over 60 different anti-viruses with a mere two clicks and five seconds!
Stars: ✭ 18 (-99.03%)
Mutual labels:  contextmenu, context-menu
rctx-contextmenu
✨ Context menu for React
Stars: ✭ 23 (-98.76%)
Mutual labels:  contextmenu, context-menu
Jquery Ui Contextmenu
jQuery plugin that turns a jQueryUI menu widget into a context menu.
Stars: ✭ 170 (-90.83%)
Mutual labels:  menu, context-menu
V Selectmenu
SelectMenu for Vuejs, A simple, easier and highly customized menu solution
Stars: ✭ 169 (-90.88%)
Mutual labels:  menu, contextmenu
elm-contextmenu
Flexible context menu for Elm
Stars: ✭ 16 (-99.14%)
Mutual labels:  contextmenu, context-menu
React Contexify
Add a context menu to your react app with ease
Stars: ✭ 575 (-68.99%)
Mutual labels:  menu, context-menu
Brisk Menu
An efficient menu for the MATE Desktop
Stars: ✭ 142 (-92.34%)
Mutual labels:  menu

Context-Menu.iOS

You can easily add awesome animated context menu to your app.

Made in Yalantis

Check this [project on dribbble] (https://dribbble.com/shots/1785274-Menu-Animation-for-Additional-Functions?list=users&offset=17)

Check this [project on Behance] (https://www.behance.net/gallery/20411445/Mobile-Animations-Interactions)

ContextMenu

Installation

CocoaPods

pod 'ContextMenu.iOS', '~> 1.1.0'

Manually

Copy all files from YALContextMenu folder to your xcode project.

Usage

Objective-C

You are welcome to see the sample of the project for fully operating sample in the Example folder.

  • Add folder YALContextMenu to your project.
  • #import “YALContextMenuTableView.h” to your view controller
  • Create custom UITableViewCell with UIView property for rotation animation and UIView property for fade out animation.
  • Your custom cell should implement YALContextMenuCell protocol
@protocol YALContextMenuCell <NSObject>

- (UIView *)animatedIcon;
- (UIView *)animatedContent;

@end
  • Use the following code sample to start menu
- (IBAction)presentMenuButtonTapped:(UIBarButtonItem *)sender {
// init YALContextMenuTableView tableView
if (!self.contextMenuTableView) {
self.contextMenuTableView = [[YALContextMenuTableView alloc]initWithTableViewDelegateDataSource:self];
self.contextMenuTableView.animationDuration = 0.15;
//optional - implement custom YALContextMenuTableView custom protocol
self.contextMenuTableView.yalDelegate = self;
//optional - implement menu items layout
self.contextMenuTableView.menuItemsSide = Right;
self.contextMenuTableView.menuItemsAppearanceDirection = FromTopToBottom;

//register nib
UINib *cellNib = [UINib nibWithNibName:@"ContextMenuCell" bundle:nil];
[self.contextMenuTableView registerNib:cellNib forCellReuseIdentifier:@"contextMenuCellReuseId"];
}

// it is better to use this method only for proper animation
[self.contextMenuTableView showInView:self.navigationController.view withEdgeInsets:UIEdgeInsetsZero animated:YES];
}
  • Use default UITableViewDataSource methods for additional set up and customisation of the cell.
  • Сall updateAlongsideRotation method before the rotation animation started and reloadData method after rotation animation finished or in UIViewControllerTransitionCoordinator's animateAlongsideTransition block for proper rotation animation.
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
//should be called after rotation animation completed
[self.contextMenuTableView reloadData];
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];

[self.contextMenuTableView updateAlongsideRotation];
}

- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {

[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];


[coordinator animateAlongsideTransition:nil completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
//should be called after rotation animation completed
[self.contextMenuTableView reloadData];
}];
[self.contextMenuTableView updateAlongsideRotation];

}

Swift

You should add the following line to your bridging header:

@import ContextMenu_iOS;

Customisation

To customise menu items side position you can specify a 'menuItemsSide' property. When it set to 'Right' the first cell will be opened from right to left and selected cell will be closed vice versa and when it set to 'Left' the first cell will be opened from left to right and selected cell will be closed vice versa. Default - Right.

Also, to customise menu items appearance direction you can specify 'menuItemsAppearanceDirection' property. Default - FromTopToBottom.

To customise cell set up your custom drawables in the animated icon. Actually the cell design and layout is completely at your choice.

animationDuration is to be used for animation speed in seconds.

Compatibility

iOS 7, iOS 8, iOS 9

Version: 1.1.0

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

License

Copyright 2017, Yalantis

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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