擁有漂亮的動畫iOS下拉菜單:IGLDropDownMenu

jopen 10年前發布 | 30K 次閱讀 iOS開發 移動開發 IGLDropDownMenu

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.baiduhome.net/lib/view/home/1413853787606

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!