SwiftEntryKit icon indicating copy to clipboard operation
SwiftEntryKit copied to clipboard

roundCorners of EKAttributes doesn't work for customView/viewController

Open Roen-Ro opened this issue 2 years ago • 1 comments

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 F6710E76-00B3-4035-A484-C1C383C80339

Roen-Ro avatar Jul 12 '21 06:07 Roen-Ro

You should set the entryBackground instead of the customView's backgroundColor

feixue299 avatar Aug 09 '21 09:08 feixue299