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

New Year marketing going to extremes? Pepsi's brainstorm is amazing

Why can a brand IP that has been operating for 8 ...

400 phone applications can be processed online directly

Now when we help you with the phone number, a com...

A comprehensive analysis of Tik Tok’s private domain!

Let’s start with the time and a speech. Four mont...

Watch is a powerful open source project abroad

Source code introduction: Watch is a powerful ope...

Why do 5G mobile phones support more frequency bands?

How many 5G frequency bands a mobile phone can su...

4 steps to quickly increase your conversion rate!

First of all, what is the growth we want to talk ...

Where is the Zhihu advertising backend? Where can I connect to the delivery?

Professional related: Qinggua Media Mobile Market...

The dog never thought that his urine could save a bird's life! | Nature Trumpet

Welcome to the 17th issue of the Nature Trumpet c...

Apple releases iOS16 Beta 2! Let's take a look at what's updated

Apple recently pushed the iOS/iPadOS 16 Developer...