Swift - 错误'Expected','separator'和'表达式列表中的预期表达式'

时间:2016-04-01 03:34:39

标签: ios swift

let screenBounds = UIScreen.mainScreen().bounds   
var initialOrigin: CGFloat = UIScreen.mainScreen().bounds.height - 108   
let offset: CGFloat = 108   
var lastItem: ViewModel?   
var currentURIs = [NSURL]()

lazy var panRecognizer: UIPanGestureRecognizer = UIPanGestureRecognizer(target: self, action:
    #selector(PlayerController.handlePanGesture(_:)))   
lazy var tapRecognizer: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action:
    #selector(PlayerController.handleTapGesture(_:)))

为上述代码获取错误'Expected ',' separator''Expected expression in list of expressions'。如果有人启发我会很好......

1 个答案:

答案 0 :(得分:11)

将Xcode更新为7.3新的#selector语法仅适用于Xcode 7.3(或更新版本)