iOS source code download: ActionSheet effect imitating QQ Music

iOS source code download: ActionSheet effect imitating QQ Music

Functional classification: Special effects

Supported platforms: iOS

Operating environment: iOS

Development language: Object-C

Development tools: Xcode

Source code size: 201.42KB

Source code download address: http://down..com/data/1976533

Source code introduction

Implement the ActionSheet effect of QQ Music through custom models. You can customize the menu pictures, menu arrays and motor events. It is easy to use.

Source code running screenshot

Source code snippet

  1. -( void )initDemoData{
  2. DownSheetModel *Model_1 = [[DownSheetModel alloc]init];
  3. Model_1.icon = @ "icon_add" ;
  4. Model_1.icon_on = @ "icon_add_hover" ;
  5. Model_1.title = @ "Add" ;
  6. DownSheetModel *Model_2 = [[DownSheetModel alloc]init];
  7. Model_2.icon = @ "icon_album" ;
  8. Model_2.icon_on = @ "icon_album_hover" ;
  9. Model_2.title = @ "Album" ;
  10. DownSheetModel *Model_3 = [[DownSheetModel alloc]init];
  11. Model_3.icon = @ "icon_buy" ;
  12. Model_3.icon_on = @ "icon_buy_hover" ;
  13. Model_3.title = @ "Purchase" ;
  14. DownSheetModel *Model_4 = [[DownSheetModel alloc]init];
  15. Model_4.icon = @ "icon_computer" ;
  16. Model_4.icon_on = @ "icon_computer_hover" ;
  17. Model_4.title = @ "Synchronization" ;
  18. DownSheetModel *Model_5 = [[DownSheetModel alloc]init];
  19. Model_5.icon = @ "icon_down" ;
  20. Model_5.icon_on = @ "icon_down_hover" ;
  21. Model_5.title = @ "Download" ;
  22. DownSheetModel *Model_6 = [[DownSheetModel alloc]init];
  23. Model_6.icon = @ "icon_del" ;
  24. Model_6.icon_on = @ "icon_del_hover" ;
  25. Model_6.title = @ "Delete" ;
  26. MenuList = [[NSArray alloc]init];
  27. MenuList = @[Model_1,Model_2,Model_3,Model_4,Model_5,Model_6];
  28. }
  29.   
  30. -( void )clickMenu{
  31. DownSheet *sheet = [[DownSheet alloc]initWithlist:MenuList height:0];
  32. sheet.delegate = self;
  33. [sheet showInView:nil];
  34. }
  35.   
  36. -( void )didSelectIndex:(NSInteger)index{
  37. UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@ "Prompt" message:[NSString stringWithFormat:@ "You are currently clicking the %dth button" , index] delegate:nil cancelButtonTitle:@ "OK" otherButtonTitles:nil];
  38. [alert show];
  39. }

Source code download address: http://down..com/data/1976533

<<:  Who can compete with Apple in the programming world? Apple's Swift shows its edge

>>:  Android source code download: Bluetooth online Gobang game

Recommend

NAS is seeking change. Can the “0 cost, low threshold” Master Lu stand out?

The rapid development of Internet technology has ...

Let’s go! Cross China’s longest National Highway 219

According to the latest version National Highway ...

Android event distribution mechanism

Event distribution mechanism Android event distri...

There is no Yang now, what's going on? Maybe there really is a "chosen one"!

On December 30, the Sichuan Provincial Center for...

9 mysterious maps, how many can you recognize?

Loading long image... Source: National Geographic...