我在视图控制器的视图中添加了两个 AwesomeMenu。问题是一个覆盖另一个,而第一个甚至没有出现。我尝试将背景设置为 clearColor (我认为,无论如何,这是默认设置),但这无济于事。当然,我可以将两个 AwesomeMenu 视图的框架设置为不重叠,但这会导致 AwesomeMenu 的视图太小而无法容纳其所有菜单项。
我可能在这里遗漏了一些简单的东西。谢谢您的帮助。
self.colorMenu = [[AwesomeMenu alloc]initWithFrame:self.view.bounds startItem:startItem optionMenus:startMenuItems];
self.colorMenu.startPoint = CGPointMake(self.view.bounds.size.width/2.0,
self.view.bounds.size.height - starImage.size.height);
self.colorMenu.menuWholeAngle = M_PI;
self.colorMenu.rotateAngle = -M_PI_2;
self.colorMenu.delegate = self;
[self.view addSubview:self.colorMenu];
// brush menu
NSMutableArray *brushMenuItems = [[NSMutableArray alloc] initWithCapacity:10];
for (int i=0; i<5; i++) {
AwesomeMenuItem *menuItem = [[AwesomeMenuItem alloc] initWithImage:storyMenuItemImage
highlightedImage:storyMenuItemImagePressed
ContentImage:starImage
highlightedContentImage:nil];
[brushMenuItems addObject:menuItem];
}
self.brushMenu = [[AwesomeMenu alloc]initWithFrame:self.view.bounds startItem:startItem optionMenus:brushMenuItems];
self.brushMenu.startPoint = CGPointMake(self.view.bounds.size.width*.3,
self.view.bounds.size.height - starImage.size.height);
self.brushMenu.menuWholeAngle = M_PI;
self.brushMenu.rotateAngle = -M_PI_2;
self.brushMenu.delegate = self;
[self.view addSubview:self.brushMenu];