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
| class SearchView: UIView { | |
| override init(frame: CGRect) { | |
| super.init(frame: frame) | |
| setup() | |
| } | |
| required init?(coder aDecoder: NSCoder) { | |
| super.init(coder: aDecoder) |
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
| class SearchView: UIView { | |
| // MARK: Properties | |
| // ... | |
| struct Colors { | |
| static let backgroundButtonBackgroundColor = UIColor.clear | |
| static let backgroundButtonTintColor = #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1) | |
| static let foregroundButtonBackgroundColor = #colorLiteral(red: 1, green: 0.8, blue: 0, alpha: 1) |
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
| class SearchView: UIView { | |
| // MARK: Properties | |
| ... | |
| struct Colors { | |
| static let backgroundButtonBackgroundColor = UIColor.clear | |
| static let backgroundButtonTintColor = #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1) | |
| static let foregroundButtonBackgroundColor = #colorLiteral(red: 1, green: 0.8, blue: 0, alpha: 1) |
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
| class SearchView: UIView { | |
| ... | |
| func update(progress: CGFloat) { | |
| } | |
| } |
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
| class SearchView: UIView { | |
| // MARK: Properties | |
| enum AnimationState: CGFloat { | |
| case start = 0.0, full = 0.7, finalBigSize = 1 | |
| } | |
| } |
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
| class ViewController: UIViewController { | |
| // MARK: Properties | |
| @IBOutlet weak var scrollView: UIScrollView! | |
| @IBOutlet weak var searchView: SearchView! | |
| let goal: CGFloat = 50 | |
| var observeScrollViewContentOffset: NSKeyValueObservation? | |
| // MARK: Lifecycle |
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
| class ViewController: UIViewController { | |
| // MARK: Properties | |
| @IBOutlet weak var scrollView: UIScrollView! | |
| @IBOutlet weak var searchView: SearchView! | |
| let goal: CGFloat = 50 | |
| var observeScrollViewContentOffset: NSKeyValueObservation? | |
| // MARK: Lifecycle |
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
| struct Colors { | |
| static let backgroundButtonBackgroundColor = UIColor.clear | |
| static let backgroundButtonTintColor = #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1) | |
| static let foregroundButtonBackgroundColor = #colorLiteral(red: 1, green: 0.8, blue: 0, alpha: 1) | |
| static let foregroundButtonTintColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) | |
| } | |
| let shapeLayer = CAShapeLayer() | |
| let backgroundButton = UIButton() | |
| let foregroundButton = UIButton() |
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
| enum AnimationState: CGFloat { | |
| case start = 0.0, full = 0.7, finalBigSize = 1 | |
| } |
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
| enum AnimationState: CGFloat { | |
| case start = 0.0, full = 0.7, finalBigSize = 1 | |
| } |