ios - 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 视图,但它返回无法识别的错误。问题出在哪里?
解决方案
推荐阅读
- html - 对齐项目:居中;不适用于截断的菜单
- swift - 如何使用 OSLog 记录泛型类型的值?
- java - Java 和 Makefiles:有没有办法确保一个类是否依赖于另一个类,首先构建该类而不是明确的?
- tensorflow - 如何构建 TensorFlow 新 GPU 运算
- python - sqlite3:使用一行中的两列进行计算
- elasticsearch - ElasticSearch 匹配查询到包含数字的字段
- javascript - Javascript - 删除包含相似名称的属性
- logging - 如何将日志目录发送到 graylog
- java - 在 log4j2.xml 中为 Mule ESB 应用程序添加了 Kafka 附加程序
- javascript - Angularjs json如何获取属性名称