- Notifications
You must be signed in to change notification settings - Fork0
A fully customisable subclass of the UIButton which allows you to create beautiful gradient buttons.
License
suhitp/SwiftGradientButton
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A fully customisable subclass of the UIButton which allows you to create beautiful gradient buttons.
SwiftGradientButton is a library for to create custom GradientButton for iOS. It can be used to easily apply custom gradients on UIButton with custom startColor, endColor, startPoint, endPoint properties. Use cornerRadius property to apply rounded corners to GradientButton.
- iOS 11 or any higher version.
- Xcode 9 or any higher version.
- Swift 5.0 or any higher version.
- SwiftGradientButton is compatible with Swift 5 as of release0.1.0.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate SwiftGradientButton into your Xcode project using CocoaPods, specify it in yourPodfile:
source'https://github.com/cocoapods/specs.git'platform:ios,'11.0'use_frameworks!pod'SwiftGradientButton'
Then, run the following command:
$ pod install
change UIButton class to GradientButton and customise below properties
import SwiftGradientButton in your UIViewController or UIView subclass file and create custom GradientButton property like below and apply customisations
letgradientButton=GradientButton() gradientButton.cornerRadius=5 gradientButton.startColor=UIColor.blue gradientButton.endColor=UIColor.green gradientButton.startPoint=CGPoint(x:0.0, y:0.5) gradientButton.endPoint=CGPoint(x:1.0, y:0.5)
Suhit Patil,suhit.patil@gmail.com
SwiftGradientButton is available under the MIT license.
About
A fully customisable subclass of the UIButton which allows you to create beautiful gradient buttons.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.

