Swift 3子类化OperationQueue

时间:2016-08-02 11:04:36

标签: nsoperationqueue swift3

将代码迁移到Swift 3(Xcode 8 beta 4)时遇到了一些问题。

    import Foundation

    class MyOperationQueue: Foundation.OperationQueue {
    override func addOperation(_ op: Operation) {
    ....
    }

我收到了这两个错误: enter image description here

1 个答案:

答案 0 :(得分:1)

找到解决方案:

override func addOperation(_ op: Foundation.Operation) {
    ....
}