代码:
let contextHolder = UnsafeMutablePointer<Void>() |
出错:
‘init()’ is deprecated: init() will be removed in Swift 3. Use `nil` instead
搜:
‘init()’ is deprecated: init() will be removed in Swift 3. Use `nil` instead
ios – How to fix warning init() is deprecated – Stack Overflow
Xcode 7.3 beta 2 & 3 issue · Issue #212 · xmartlabs/Eureka
Swift 3: Parameterless initializer will be removed warning (Swift) – Codedump.io
改为:
// let contextHolder = UnsafeMutablePointer<Void>() let contextHolder:UnsafeMutablePointer<Void> = nil |
或:
let contextHolder = UnsafeMutablePointer<Void>(nil) |
即可。
转载请注明:在路上 » 【已解决】swift 3出错: ‘init()’ is deprecated: init() will be removed in Swift 3. Use `nil` instead