【发布时间】:2021-12-06 07:48:43
【问题描述】:
在尝试使用扫描仪时,我收到警告说“scanLocation”在 iOS 13.0 中已被弃用。Apple 的 Scanner 文档甚至没有提到弃用,更不用说建议什么取代了 scanLocation。
使用 scanLocation 的示例,已弃用:
convenience init(hexString: String) {
let scanner = Scanner(string: hexString)
scanner.scanLocation = 0 // 'scanLocation' was deprecated in iOS 13.0
var rgbValue: UInt64 = 0
scanner.scanHexInt64(&rgbValue)
}
【问题讨论】:
标签: deprecated ios13