Programming a UIButton is not working in Swift 4 Xcode 9 Beta 6, Cannot add target
问题 In the past I had no problem creating a UIButton programmatically, but ever since I've been using Xcode 9 and Swift 4, I cannot find a way to make this error go away. //Adding target to UIButton func PositionStartButton(xOffset: Float){ StartButton.frame = CGRect(x: Int(0 - 40 + xOffset), y: 0, width: 80, height: 80) StartButton.setImage(#imageLiteral(resourceName: "Logo_Final_WHITE_Face"), for: .normal) StartButton.addTarget(self, action: "pressButton:", for: .touchUpInside) ScrollView