代码库> 菜单> 类似Tumblr iOS应用菜单视图,带上匹配的动画
类似Tumblr iOS应用菜单视图,带上匹配的动画
关注
上传者:jackvshua 分类:菜单(Menu)
查看次数:6031 下载次数:8
上传时间:2014-01-14 大小:
cvpic('https://github.com/JackTeam/XHTumblrMenu/raw/master/Screenshots/XHTumblrMenu.gif','','700','700')
XHTumblrMenu
Tumblr iOS app like menu view.
Completely created using core animation.
Easy to drop into your project.
You can add as many items as you want, the XHTumblrMenu will layout them automatically.
Requirements
XHTumblrMenu requires Xcode 5, targeting either iOS 5.0 and above, ARC-enabled.
Installation
CocoaPods is the recommended method of installing XHTumblrMenu, just add the following line to your Podfile:
Podfile
[pre]pod 'XHTumblrMenu'[/pre]
How to use
Drag XHTumblrMenu.h amd XHTumblrMenu.m files to your project.
No other frameworks required.
[pre]#import "XHTumblrMenu.h"XHTumblrMenu *tumblrMenu = [[XHTumblrMenu alloc] init];for (int i = 0; i < 6; i ++) {   XHTumblrMenuItem *tumblrMenuItem = [[XHTumblrMenuItem alloc] init];   tumblrMenuItem.title = [NSString stringWithFormat:@"Title%d", i];   tumblrMenuItem.iconImage = [UIImage imageNamed:[NSString stringWithFormat:@"Title%d.png", i]];   tumblrMenuItem.tumblrMenuViewSelectedBlock = ^(XHTumblrMenu *tumblrMenu, XHTumblrMenuItem *tumblrMenuItem) {            NSLog(@"title : %@   index : %d", tumblrMenuItem.title, tumblrMenuItem.index);   };   [tumblrMenu addMenuItemWithTumblrMenuItem:tumblrMenuItem];}[tumblrMenu show];[/pre]
public Api
[pre]// background@property (nonatomic, strong) UIImageView *backgroundImgView;// show property@property (nonatomic, assign) NSTimeInterval tumblrMenuViewShowItemAnimationTime; // default is 0.37// dissMiss@property (nonatomic, assign) XHTumblrMenuDissmissAnimationType dissmissAnimationType; // default is kXHFade@property (nonatomic, assign) NSTimeInterval dissMissDuration; // default is 0.1;[/pre]

Lincense
XHTumblrMenu is available under the MIT license. See the LICENSE file for more info.
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0


下载过该代码的还下载了
综合评论
提示
sina weixin mail 回到顶部