Perf: remove unnecessary shadows and mask views
This commit is contained in:
@@ -149,6 +149,10 @@ class BrowserView: UIView
|
||||
autocompleteView.layer.cornerRadius = 8.0
|
||||
autocompleteView.layer.masksToBounds = true
|
||||
|
||||
let shadowPath = UIBezierPath(roundedRect: autocompleteView.bounds,
|
||||
cornerRadius: autocompleteView.layer.cornerRadius)
|
||||
autocompleteView.layer.shadowPath = shadowPath.cgPath
|
||||
|
||||
if let toolbarView = toolbarView, let urlBar = toolbarView.urlBar {
|
||||
let urlFrame = self.convert(urlBar.frame, from: urlBar.superview)
|
||||
autocompleteView.frame = CGRect(
|
||||
@@ -158,6 +162,9 @@ class BrowserView: UIView
|
||||
height: bounds.height / 2.5
|
||||
)
|
||||
}
|
||||
} else {
|
||||
autocompleteView.layer.cornerRadius = 0.0
|
||||
autocompleteView.layer.shadowOpacity = 0.0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user