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 evolution of AI technology is underestimated by the public

ChatGPT, recently launched by OpenAI, has become ...

The official account's ten-minute stock trading video course

Introduction to the resources of the public accou...

SEO 100,000 Whys? What is SEO?

Here, we have collected common SEO problems and c...

Who is being cheated by the Windows 10 forced upgrade?

As early as when Windows 10 was released, Microsof...

"Hupu" product analysis report

Hupu is a pan-entertainment community product tha...

How to create a hot-selling fission event promotion?

Fission is an important part of studying user gro...

Why is "封神" not "封仙"? The true origin of the words "封" and "神"

The first film of China's first mythological ...

3 tips to tell you why your advertising is not effective!

This is an era of information bombardment, and al...

Event Promotion Plan | Key points on event design and traffic considerations!

To make a successful event, you often need three ...