SwiftEntryKit
SwiftEntryKit copied to clipboard
roundCorners of EKAttributes doesn't work for customView/viewController
As title, the following code shows how i set the roundCorners
for a customView display
let customView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height/2));
customView.backgroundColor = UIColor.yellow;
var attributes = EKAttributes.bottomNote;
attributes.screenBackground = .color(color: EKColor(UIColor(white: 0.25, alpha: 0.85)));
attributes.positionConstraints.safeArea = .overridden;
attributes.positionConstraints.size = .init(
width: .constant(value: 300),
height: .constant(value: 500)
)
attributes.roundCorners = .top(radius: 25) //doesn't work
SwiftEntryKit.display(entry: customView, using: attributes)
Expected behavior
You should set the entryBackground instead of the customView's backgroundColor