首页 > 解决方案 > SwiftEntryKit 在存在线程 1 时返回错误:EXC_BAD_ACCESS (code=1, address=0x1e0)

问题描述

     public func displayCustomAttributes() {
        // Create a basic toast that appears at the top
        var attributes = EKAttributes.topToast

        // Set its background to white
        attributes.entryBackground = .color(color: .white)

        // Animate in and out using default translation
        attributes.entranceAnimation = .translation
        attributes.exitAnimation = .translation

        let customView = UIView()
        /*
        ... Customize the view as you like ...
        */

        // Display the view with the configuration
        SwiftEntryKit.display(entry: customView, using: attributes)
    }

我尝试了上面的基本示例来使用SwiftEntryKit显示 toast 视图,但它返回无法识别的错误。问题出在哪里?在此处输入图像描述

标签: iosswiftxcodeexc-bad-access

解决方案


推荐阅读