种类主页: AwesomeMenu
项目主页

实例下载: 风行源代码点击下载

用法简介:

经过创办菜单各种单元项来创建菜单:

UIImage *storyMenuItemImage = [UIImage imageNamed:@"bg-menuitem.png"];
UIImage *storyMenuItemImagePressed = [UIImage imageNamed:@"bg-menuitem-highlighted.png"];
UIImage *starImage = [UIImage imageNamed:@"icon-star.png"];
AwesomeMenuItem *starMenuItem1 = [[AwesomeMenuItem alloc] initWithImage:storyMenuItemImage
                                                           highlightedImage:storyMenuItemImagePressed
                                                               ContentImage:starImage
                                                    highlightedContentImage:nil];
AwesomeMenuItem *starMenuItem2 = [[AwesomeMenuItem alloc] initWithImage:storyMenuItemImage
                                                           highlightedImage:storyMenuItemImagePressed
                                                               ContentImage:starImage
                                                    highlightedContentImage:nil];
// "开始"单元格,类似于 Path 的"添加"按钮.
AwesomeMenuItem *startItem = [[AwesomeMenuItem alloc] initWithImage:[UIImage imageNamed:@"bg-addbutton.png"]
                                                   highlightedImage:[UIImage imageNamed:@"bg-addbutton-highlighted.png"]
                                                       ContentImage:[UIImage imageNamed:@"icon-plus.png"]
                                            highlightedContentImage:[UIImage imageNamed:@"icon-plus-highlighted.png"]];

下一场,开首化菜单和抉择:

AwesomeMenu *menu = [[AwesomeMenu alloc] initWithFrame:self.window.bounds startItem:startItem optionMenus:[NSArray arrayWithObjects:starMenuItem1, starMenuItem2]];
menu.delegate = self;
[self.window addSubview:menu];

2018正版葡京赌侠诗,您也可以动用使用菜单的各样属性,自定义:

重复确定”添加”按钮的地点:

menu.startPoint = CGPointMake(160.0, 240.0);

设置旋转角度:

menu.rotateAngle = 0.0;

安装任何菜单的按钮角度:

menu.menuWholeAngle = M_PI * 2;

设置每个菜单项之间动画延迟执行的时光距离:

menu.timeOffset = 0.036f;

适于弹动动画:

menu.farRadius = 140.0f;
menu.nearRadius = 110.0f;

设置”添加菜单”与其余菜单单元格之间的相距:

menu.endRadius = 120.0f;

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图