REMenu能够提供下弹出来的菜单,跳转到不同的vc后菜单便会收起。菜单的弹收都有回弹(bounce)的效果。
效果图:
class="zoom" src="/Upload/Images/2014111310/B5140522137B3D4F.jpg" alt="" height="568" border="0" />
使用方法:
先把REMenu的文件夹复制到自己的项目中,然后导入头文件:
#include "REMenu.h"
Demo中的实现方法:
REMenuItem *homeItem = [[REMenuItem alloc] initWithTitle:@"Home"
subtitle:@"Return to Home Screen"
image:[UIImage imageNamed:@"Icon_Home"]
highlightedImage:nil
action:^(REMenuItem *item) {
NSLog(@"Item: %@", item);
}];
REMenuItem *exploreItem = [[REMenuItem alloc] initWithTitle:@"Explore"
subtitle:@"Explore 47 additional options"
image:[UIImage imageNamed:@"Icon_Explore"]
highlightedImage:nil
action:^(REMenuItem *item) {
NSLog(@"Item: %@", item);
}];
REMenuItem *activityItem = [[REMenuItem alloc] initWithTitle:@"Activity"
subtitle:@"Perform 3 additional activities"
image:[UIImage imageNamed:@"Icon_Activity"]
highlightedImage:nil
action:^(REMenuItem *item) {
NSLog(@"Item: %@", item);
}];
REMenuItem *profileItem = [[REMenuItem alloc] initWithTitle:@"Profile"
image:[UIImage imageNamed:@"Icon_Profile"]
highlightedImage:nil
action:^(REMenuItem *item) {
NSLog(@"Item: %@", item);
}];
self.menu = [[REMenu alloc] initWithItems:@[homeItem, exploreItem, activityItem, profileItem]];
[self.menu showFromNavigationController:self.navigationController];
也能够从自定义的View中弹出菜单:
- (void)showFromRect:(CGRect)rect inView:(UIView *)view;
- (void)showInView:(UIView *)view;
更多具体详尽的内容请参考demo或查看哦.
详细说明:http://ios.662p.com/thread-2223-1-1.html