小编典典

Swift-错误“期望的','分隔符”和“表达式列表中的期望表达式”

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'上面的代码..如果有人启发我,那将是非常好..


阅读 348

收藏
2020-07-07

共1个答案

小编典典

将Xcode更新为7.3新的#selector语法仅在Xcode 7.3(或更高版本)中有效

2020-07-07