Share Button in Swift

Share Button in Swift

Source code introduction: Share button written in Swift, simple and easy to use

Test environment: Xcode 6.2, iOS 7.0 or above

Source code effect:

Source code snippet:

  1. let deformationBtn = DeformationButton(frame: CGRectMake( 100 , 100 , 140 , 36 ), color: getColor( "e13536" ))
  2. self.view.addSubview(deformationBtn)
  3. deformationBtn.forDisplayButton.setTitle( "Weibo Registration" , forState: UIControlState.Normal)
  4. deformationBtn.forDisplayButton.titleLabel?.font = UIFont.systemFontOfSize( 15 );
  5. deformationBtn.forDisplayButton.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
  6. deformationBtn.forDisplayButton.titleEdgeInsets = UIEdgeInsetsMake( 0 , 6 , 0 , 0 )
  7. deformationBtn.forDisplayButton.setImage(UIImage(named: "Weibo logo.png" ), forState: UIControlState.Normal)
  8. deformationBtn.addTarget(self, action: "btnEvent" , forControlEvents: UIControlEvents.TouchUpInside)

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

<<:  Parse Tutorial: Network Backend Basics

>>:  Swift version of infinite loop carousel

Recommend

The four core rules of community operation!

The moment users settle on personal WeChat accoun...

Apple Pay is coming, what developers should do

"iOS8.1 already has this feature, but it was...

Why can’t Douyin influencer promotion be charged based on results?

Whether it is performance advertising or brand ad...

The current situation and trends of Internet advertising!

Since the second half of 2018, the saying that di...

WeChat group fission practice: fission 1,000 groups within 30 days!

Starting last year, the term "private domain...

Detailed explanation of the 618 e-commerce activity plan!

Today we are going to talk about how to implement...

Douyin marketing plan and advertising number selection strategy

In the past three years, I have managed the entir...

Activity operation sandbox/activation engine

We have talked about so many recommendation algor...

Douyu and Huya product analysis report!

After several rounds of reshuffles, the game live...