This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Visit my blog http://scripttes.blogspot.com/ | |
| //IOS Template https://codecanyon.net/item/simple-qr-code-barcode-scanner-generate-ios-12-and-13/25018066 | |
| import Foundation | |
| import UIKit | |
| extension UIView { | |
| func setGradientBackground(colorOne: UIColor, colorTwo: UIColor) { | |
| let gradientLayer = CAGradientLayer() | |
| gradientLayer.frame = bounds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation UIImage (scale) | |
| /** | |
| * Scales an image to fit within a bounds with a size governed by | |
| * the passed size. Also keeps the aspect ratio. | |
| * | |
| * Switch MIN to MAX for aspect fill instead of fit. | |
| * | |
| * @param newSize the size of the bounds the image must fit within. | |
| * @return a new scaled image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Created by Dima Vartanian on 10/29/15. | |
| // | |
| import Foundation | |
| import Crashlytics | |
| // this method gives us pretty much the same functionality as the CLS_LOG macro, but written as a Swift function, the only differences are that we have to use array syntax for the argument list and that we don't get see if the method being called is a class method or an instance method. We also have to define the DEBUG compiler flag with -D DEBUG. | |
| /// Usage: | |
| /// |