拥有漂亮的动画iOS下拉菜单:IGLDropDownMenu

jopen 9年前

IGLDropDownMenu是一个iOS下拉菜单。可以实现多种菜单动画效果。旋转、难叠、滑动等。

示例代码

  1. Create your IGLDropDownItem array and set up

    NSMutableArray *dropdownItems = [[NSMutableArray alloc] init];  IGLDropDownItem *item = [[IGLDropDownItem alloc] init];  [item setIconImage:[UIImage imageNamed:@"icon.png"]];  [item setText:@"title"];  [dropdownItems addObject:item];
  2. Create your IGLDropDownMenu and set the up the parameter name dropDownItems

    IGLDropDownMenu *dropDownMenu = [[IGLDropDownMenu alloc] init];  [dropDownMenu setFrame:CGRectMake(0, 0, 200, 45)];  dropDownMenu.menuText = @"Choose Weather";  dropDownMenu.menuIconImage = [UIImage imageNamed:@"chooserIcon.png"]];  dropDownMenu.paddingLeft = 15;  // padding left for the content of the button
  3. modify the params of IGLDropDownMenu

    dropDownMenu.type = IGLDropDownMenuTypeStack;  dropDownMenu.gutterY = 5;  dropDownMenu.itemAnimationDelay = 0.1;  dropDownMenu.rotate = IGLDropDownMenuRotateRandom;
  4. Call the reloadView method (Very Important!)

    // every time you change the params you should call reloadView method  [dropDownMenu reloadView];

拥有漂亮的动画iOS下拉菜单:IGLDropDownMenu

项目主页:http://www.open-open.com/lib/view/home/1413853787606