Beautiful menu animation

Beautiful menu animation

Source code introduction

You can add beautiful animated content to the app's menu, customize the icon and title, and design cells and layouts according to your preferences.
Source code running screenshot

Source code snippet:

  1. - (IBAction)presentMenuButtonTapped:(UIBarButtonItem *)sender {
  2. // init YALContextMenuTableView tableView  
  3. if (!self.contextMenuTableView) {
  4. self.contextMenuTableView = [[YALContextMenuTableView alloc]initWithTableViewDelegateDataSource:self];
  5. self.contextMenuTableView.animationDuration = 0.15 ;
  6. //optional - implement custom YALContextMenuTableView custom protocol  
  7. self.contextMenuTableView.yalDelegate = self;
  8.           
  9. //register nib  
  10. UINib *cellNib = [UINib nibWithNibName:@ "ContextMenuCell" bundle:nil];
  11. [self.contextMenuTableView registerNib:cellNib forCellReuseIdentifier:menuCellIdentifier];
  12. }
  13.   
  14. // it is better to use this method only for proper animation  
  15. [self.contextMenuTableView showInView:self.navigationController.view withEdgeInsets:UIEdgeInsetsZero animated:YES];
  16. }
  17.   
  18. #pragma mark - Local methods
  19.   
  20. - ( void )initiateMenuOptions {
  21. self.menuTitles = @[@ "" ,
  22. @ "Send message" ,
  23. @ "Like profile" ,
  24. @ "Add to friends" ,
  25. @ "Add to favorites" ,
  26. @ "Block user" ];
  27.   
  28. self.menuIcons = @[[UIImage imageNamed:@ "Icnclose" ],
  29. [UIImage imageNamed:@ "SendMessageIcn" ],
  30. [UIImage imageNamed:@ "LikeIcn" ],
  31. [UIImage imageNamed:@ "AddToFriendsIcn" ],
  32. [UIImage imageNamed:@ "AddToFavouritesIcn" ],
  33. [UIImage imageNamed:@ "BlockUserIcn" ]];
  34. }

Source code download: http://download..com/data/1984622

<<:  Douban Photo Album Collection

>>:  OS X, iOS and Linux all have more vulnerabilities than Windows

Recommend

official! Tik Tok advertising promotion quotation list~

Tik Tok has seized the domestic video market and ...

No offline business: Can Internet TV escape being a niche?

After experiencing a wave of Internet development...

How does DPI technology empower routers to achieve intelligent acceleration?

Part 01 The significance of DPI research and deve...

11 Mobile App Development Trends in 2017

Smartphones have become an integral part of our d...

How to quickly and effectively increase the number of APP users?

In recent years, more and more people have entered...

How to build a 2B user operation system!

Taking Ouyeel Cloud Commerce’s B2B growth practic...