Commit 99d76f24 authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola Nitz

Actionsheet: Set rounded corners

parent 3ab2728b
......@@ -202,6 +202,12 @@ class VLCActionSheet: UIViewController {
// This is to avoid a horrible visual glitch!
mainStackView.isHidden = false
let roundedCornerPath = UIBezierPath(roundedRect: headerView.bounds, byRoundingCorners: [.topLeft, .topRight],
cornerRadii: CGSize(width: 10, height: 10))
let maskLayer = CAShapeLayer()
maskLayer.path = roundedCornerPath.cgPath
headerView.layer.mask = maskLayer
UIView.transition(with: backgroundView, duration: 0.2, options: .transitionCrossDissolve, animations: { [weak self] in
self?.backgroundView.isHidden = false
}, completion: nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment