我使用可可豆荚来安装DynamicColor和SnappingStepper。如何在" let stepper"上修复编译器错误?线。
错误:参数标签'(:,:,:,:)'不匹配任何可用的重载 当我发布此错误时,不显示下划线字符,但_character应位于每个冒号前面。
import UIKit
import DynamicColor
import SnappingStepper
class ViewController: UIViewController {
let stepper = SnappingStepper(frame: CGRect (0, 0, 100, 40))
func stepperValueChangedAction(sender: AnyObject) {
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
stepper.addTarget(self, action: "stepperValueChangedAction:", forControlEvents: .ValueChanged)
view.addSubview(stepper)
}
答案 0 :(得分:2)
像这样:
let stepper = SnappingStepper(frame: CGRect (x:0, y:0, width:100, height:40))
[在您解决之后,您的代码仍会遇到很多问题;但这回答了你提出的具体问题。)