DOPDropDownMenu-Enhanced

DOPDropDownMenu-Enhanced

Source code introduction: On this basis, I beautified the interface, added the application of dual lists, optimized the code, and enhanced the stability. I hope you like it. If you like it, please give it a star;-)

Source code effect:

Source code snippet:

  1. #pragma mark-data source protocol
  2. @class DOPDropDownMenu;
  3.  
  4. @protocol DOPDropDownMenuDataSource <NSObject>
  5.  
  6. @required  
  7.  
  8. /**
  9. * Returns the number of rows in the menu column
  10. */  
  11. - (NSInteger)menu:(DOPDropDownMenu *)menu numberOfRowsInColumn:(NSInteger)column;
  12.  
  13. /**
  14. * Return to menu column column title of each row
  15. */  
  16. - (NSString *)menu:(DOPDropDownMenu *)menu titleForRowAtIndexPath:(DOPIndexPath *)indexPath;
  17.  
  18. @optional  
  19. /**
  20. * Returns how many columns the menu has, 1 column by default
  21. */  
  22. - (NSInteger)numberOfColumnsInMenu:(DOPDropDownMenu *)menu;
  23.  
  24.  
  25. /** New
  26. * When there is a column row, return the number of items. If > 0, it means there is a secondary list. If = 0, there is no secondary list.
  27. * If none of them exists, the protocol can be ignored.
  28. */  
  29. - (NSInteger)menu:(DOPDropDownMenu *)menu numberOfItemsInRow:(NSInteger)row column:(NSInteger)column;
  30.  
  31. /** New
  32. * When there is column row item title
  33. * If none of them exists, the protocol can be ignored.
  34. */  
  35. - (NSString *)menu:(DOPDropDownMenu *)menu titleForItemsInRowAtIndexPath:(DOPIndexPath *)indexPath;
  36. @end  
  37.  
  38. #pragma mark-delegate
  39. @protocol DOPDropDownMenuDelegate <NSObject>
  40. @optional  
  41. /**
  42. * Click agent, clicked the column, row or item, if item >= 0
  43. */  
  44. - ( void )menu:(DOPDropDownMenu *)menu didSelectRowAtIndexPath:(DOPIndexPath *)indexPath;
  45. @end  

Download address: http://download..com/data/2071697

<<:  Implementing dynamic pop-up button effect

>>:  A tough New York designer teaches you the four principles of app design

Recommend

14 common problems and solutions for bidding promotion!

In bidding promotion , we often encounter some co...

A 5.5-inch phone can buy two 50-inch phones! Coocaa K50 review

Recently, the Internet TV brand Coocaa has been m...

Can WeChat’s paid reading function allow content creators to live a good life?

It has been rumored for a long time that WeChat w...

These 8 changes in the body may be signs of a serious illness!

Some changes in your body characteristics are eas...

This article will help you understand Zhihu algorithm!

We all know that self-media people attract user a...

Office for iOS: A slap in the face for Windows Phone users

[[122682]] iPad, iPhone and Android users are get...

5 ways to divert traffic from TikTok to WeChat!

With the explosive popularity of TikTok, more and...

How long will these IP marketing be popular?

No one can tell how long they will remain popular...

Those mobile phone manufacturers that have been favored by Alibaba

Nowadays, in the technology industry, you have to...