pull/132/head
Niels Andriesse 5 years ago
parent e2b40028d0
commit 33172b3ad7

@ -27,5 +27,5 @@ final class Gradient : NSObject {
final class Gradients : NSObject {
@objc static let defaultLokiBackground = Gradient(start: UIColor(hex: 0x171717), end: UIColor(hex: 0x121212))
@objc static let transparentToBlack75 = Gradient(start: UIColor(red: 0, green: 0, blue: 0, alpha: 0), end: UIColor(red: 0, green: 0, blue: 0, alpha: 0.75))
@objc static let transparentToBlack75 = Gradient(start: UIColor(red: 0, green: 0, blue: 0, alpha: 0), end: UIColor(red: 0, green: 0, blue: 0, alpha: 1))
}

@ -53,7 +53,7 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
private lazy var fadeView: UIView = {
let result = UIView()
let gradient = Gradients.transparentToBlack75
let gradient = Gradients.transparentToBlack
result.setGradient(gradient)
result.isUserInteractionEnabled = false
return result
@ -104,7 +104,11 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
tableView.pin(.trailing, to: .trailing, of: view)
tableView.pin(.bottom, to: .bottom, of: view)
view.addSubview(fadeView)
fadeView.pin(to: view)
fadeView.pin(.leading, to: .leading, of: view)
let topInset = 0.15 * view.height()
fadeView.pin(.top, to: .top, of: view, withInset: topInset)
fadeView.pin(.trailing, to: .trailing, of: view)
fadeView.pin(.bottom, to: .bottom, of: view)
// Set up search bar
// tableView.tableHeaderView = searchBar
// searchBar.sizeToFit()

Loading…
Cancel
Save