SwiftEntryKit
SwiftEntryKit copied to clipboard
attributes.roundCorners Not working
For some reason my custom view controller doesnt have rounded corners.
attributes.roundCorners = .all(radius: 25)
is doing nothing.
I saw in your demos in file NibExampleView
you set clipsToBounds=true
and additionally layer.cornerRadius = 5
I tried doing that in the viewdidload
method of my view controller. but still nothing.
fyi. my custom view controller is using a nib file.
class G8ClipPreviewVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.clipsToBounds = true
self.view.layer.cornerRadius = 25
// Do any additional setup after loading the view.
}
init() {
super.init(nibName: type(of: self).className, bundle: nil)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
- Device: XSMax
- iOS Version: 13.2
- Xcode Version : 11.2.1
- SwiftEntryKit Release # 1.2.3
Did you figure this out? I'm running into the same issue.
.border .roundCorners
are both not working for me.
Ran into the same issue.
Confirmed that adding the following seems necessary:
clipsToBounds = true layer.cornerRadius = 16
Any note on what's causing attributes.roundCorners
not to work?
I have got the same issue. As @KyleGoslan mentioned, we have to set cornerRadius twice, one with the attributes.roundCorners
and with the UIView of the view controller.
This is annoying, I'm facing same issue, rounded corners not working. P.S: thanks for a great library :)
you must set view's bgcolor UIColor.clear.
This is how I set it up
var attributes = EKAttributes()
attributes.entryBackground = .color(color: EKColor(.white))
attributes.roundCorners = .top(radius: 40)
The pop-up view needs to be clear color
i set view background color to clear, it still not working