擁有漂亮的動畫iOS下拉菜單:IGLDropDownMenu
IGLDropDownMenu是一個iOS下拉菜單。可以實現多種菜單動畫效果。旋轉、難疊、滑動等。
示例代碼
-
Create your
IGLDropDownItem
array and set upNSMutableArray *dropdownItems = [[NSMutableArray alloc] init]; IGLDropDownItem *item = [[IGLDropDownItem alloc] init]; [item setIconImage:[UIImage imageNamed:@"icon.png"]]; [item setText:@"title"]; [dropdownItems addObject:item];
-
Create your
IGLDropDownMenu
and set the up the parameter namedropDownItems
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
-
modify the params of
IGLDropDownMenu
dropDownMenu.type = IGLDropDownMenuTypeStack; dropDownMenu.gutterY = 5; dropDownMenu.itemAnimationDelay = 0.1; dropDownMenu.rotate = IGLDropDownMenuRotateRandom;
-
Call the
reloadView
method (Very Important!)// every time you change the params you should call reloadView method [dropDownMenu reloadView];
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!