Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 1.58 KB

README.md

File metadata and controls

57 lines (48 loc) · 1.58 KB

ZFPopupMenu

popupMenu can support for the layout type of Horizontal or Vertical.

Example:

##How to user ZFPopupMenu?

add the "ZFPopupMenu" folder in your project.

##Create Horizontal popupMenu.

1. create PopupMenuItem

ZFPopupMenuItem *item1 = [ZFPopupMenuItem initWithMenuName:@"新建"
                                                     image:[UIImage imageNamed:@"图标1"]
                                                    action:@selector(test1)
                                                    target:self];

2. ZFPopupMenu init

Horizontal:

ZFPopupMenu *popupMenu = [[ZFPopupMenu alloc] initWithItems:[self menuItems]];
[popupMenu showInView:self.view fromRect:fromRect layoutType:Horizontal];

Vertical:

ZFPopupMenu *popupMenu = [[ZFPopupMenu alloc] initWithItems:[self menuItems]];
[popupMenu showInView:self.view fromRect:fromRect layoutType:Vertical];

##Set ZFPopupMenu Porterty.

SetTextColor

[ZFPopupMenu setTextColorWithRed:1 green:1 blue:1 aphla:1.0];

SetBackgroundColor

[ZFPopupMenu setMenuBackgroundColorWithRed:0.6 green:0.4 blue:0.2 aphla:1];

SetHighlightedImage

[ZFPopupMenu setHighlightedImage:[UIImage imageNamed:@"cancelBg"]];

SetAphla

[ZFPopupMenu setMenuBackgroundColorWithRed:0 green:0 blue:0 aphla:0.2];

SetSeparationLineColor

[ZFPopupMenu setSeparationLineColor:[UIColor grayColor]];