Like effect button

Like effect button

Source code introduction: A button with the same effect as the like button in most applications, very convenient to use

Source code renderings:

Source code snippet:

  1. <br>
  2. <br>
  3. # import   "CatZanButton" <br>
  4. <br>
  5. CatZanButton *zanBtn=[[CatZanButton alloc] initWithFrame:CGRectMake( 0 , 0 , 50 , 50 ) zanImage:[UIImage imageNamed:@ "Zan" ] unZanImage:[UIImage imageNamed:@ "UnZan" ]];<br>
  6. [zanBtn setCenter:self.view.center];<br>
  7. [self.view addSubview:zanBtn];<br>
  8. <br>
  9. [zanBtn setClickHandler:^(CatZanButton *zanButton) {<br>
  10. if (zanButton.isZan) {
  11. //Do something<br>  
  12. } else {<br>
  13. //Do something<br>  
  14. }<br>
  15. }];<br>
  16. <br>

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

<<:  Xiaomi Vice President: Open-sourcing Android is the smartest decision Google has made

>>:  Top sliding menu FDSlideBar

Recommend

WeChat vs. TikTok: Analysis report on 4 major categories!

In 2019, WeChat’s monthly active users reached 1....

Why do sea turtles also drown in the ocean?

The Republic of Cape Verde is located in the west...

Android system Bar immersive perfect compatibility solution

introduction Since Android 5.0, Android has intro...

Xiaohongshu product analysis report!

Since its establishment in 2013, Xiaohongshu has ...

After eating "cat shit", they turned into attacking wolves | Nature Trumpet

Welcome to the 23rd issue of the Nature Trumpet c...

What is cause marketing? How should companies conduct charity marketing?

Many people think that we are far away from chari...

4 strategies to improve user retention!

Improving user retention is a big topic. Next, we...