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

How much radiation will the body absorb during an abdominal color ultrasound?

As for the physical examination items , Abdominal...

In fact, every elephant has its own name.

Produced by: Science Popularization China Author:...

2019 hot marketing promotion calendar for the whole year!

Whether you are doing shopping mall event plannin...

Water celery or poison hemlock? Don't pick wild vegetables on the roadside

As spring arrives and the temperature rises, many...

Xiaohongshu promotion skills and operation strategies!

I have to say that the speed of development of th...

Willful "membrane"! Only allows carbon dioxide to "pass"?

Author: Mo Zunli and Lv Wenbo Recently, the lates...

Top 10 H5 ads that dominated the screen in 2017, how many have you played?

2017 is almost over. Do you still remember the H5...

Wuhan Tea Contact Information

Wuhan high-end tea drinking is unique and very un...

How to get more recommendations on self-media platforms?

This article will talk to you about the article r...