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 to cold-start community activities in 7 cities within 7 days

Based on the experience of previous event operati...

What is WebWorker?

Preface Front-end engineers must have had this ex...

The 5th China (Shenyang) International Mobile Phone Expo is in full swing

The 2014 China (Shenyang) International Mobile Ph...

Product creation and verification operations for Douyin local life services

Douyin’s local life service makes targeted invita...

Hangui Speculation Research Institute 2021 "Turtle Project 2.0" video + document

Introduction to the video + document resources of...

How to make a mobile phone that will satisfy Ren Zhiqiang?

The Qihoo mobile phone brand launch on the aftern...

New Oriental Kids low-cost customer acquisition case

New Oriental KIDS+ is a new early childhood educa...