我收到一条错误消息:
致命错误:init(编码器:)尚未实现
为我的习惯UITableViewCell.单元格未注册,故事板中具有标识符单元格以及使用dequeasreusablecell时.在自定义单元格中,我有以下内容:
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
print("test")
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
Run Code Online (Sandbox Code Playgroud)
但我仍然有错误.谢谢.
我正在使用swift 3.0,我正在尝试将徽章编号添加到我的应用程序中.我相信这样做的正确方法类似于下面的内容.
application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert |
UIUserNotificationType.Badge, categories: nil
))
application.applicationIconBadgeNumber = 5
Run Code Online (Sandbox Code Playgroud)
但是,使用"|"时出错 在UIUserNotificationSettings块中并且还将收到错误"参数标签(forTypes,categories)与任何可用的重载都不匹配",UIUserNotificationSettings如果我只有UIUserNotificationType.badge第一个参数.swift 3.0是否更改了此语句的语法?