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

Traditional advertising makes 400 phone calls?

Friends who work in advertising should all have a...

Are electric toothbrushes a waste of money?

Recently, I saw a netizen saying that he has to h...

How to distinguish between Douyin information flow delivery and Douyin+?

According to official statistics, the official da...

How to play with short video information flow advertising creative sharing

Currently, short video information flow ads are v...

JSPatch – Dynamically update iOS apps

[[139654]] JSPatch is a recent amateur project. B...

Example of using multiple Storyboards in one project

Source code introduction: The problem with using ...

How should brands measure the effectiveness of advertising on TikTok?

Short videos have become popular, and a question ...