This file contains 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
import Combine | |
import UIKit | |
public enum ScrollViewDelegateEvent { | |
case didScroll(scrollView: UIScrollView) | |
case didZoom(scrollView: UIScrollView) | |
case willBeginDragging(scrollView: UIScrollView) | |
case willEndDragging((scrollView: UIScrollView, velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>)) | |
case didEndDragging((scrollView: UIScrollView, willDecelerate: Bool)) | |
case willBeginDecelerating(scrollView: UIScrollView) |
This file contains 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
extension UIView { | |
@IBInspectable | |
var cornerRadius: CGFloat { | |
get { | |
return layer.cornerRadius | |
} | |
set { | |
layer.cornerRadius = newValue | |
} | |
} |
This file contains 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
import UIKit | |
extension UIColor { | |
/** | |
Initializes and returns a color object using the specified RGB component values. | |
- Parameter red: Red value of the color object | |
- Parameter green: Green value of the color object | |
- Parameter blue: Green value of the color object | |
This file contains 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
extension UIViewController { | |
override func viewWillAppear(_ animated: Bool) { | |
super.viewWillAppear(animated) | |
self.setNeedsStatusBarAppearanceUpdate() | |
} | |
override var preferredStatusBarStyle : UIStatusBarStyle { | |
return .lightContent | |
} | |
} |