GMStepper-参数标签'(stringInterpolationSegment :)'与任何可用的重载都不匹配

时间:2019-05-26 08:59:47

标签: swift

我已经升级了xcode,并且我的项目不再编译。

  

错误:参数标签'(stringInterpolationSegment :)'不匹配   任何可用的重载。

它显示'else if'和'else'语句的错误

@IBDesignable public class GMStepper: UIControl {

    var delegate: StepperDelegate!

    /// Current value of the stepper. Defaults to 0.
    @objc @IBInspectable public var value: Double = 0 {
        didSet {
            value = min(maximumValue, max(minimumValue, value))

            let isInteger = floor(value) == value

            //
            // If we have items, we will display them as steps
            //

            if isInteger && stepValue == 1.0 && items.count > 0 {
                label.text = "\(items[Int(value)])\(self.suffixString)"
            }
            **else if isInteger {
                label.text = String.init(stringInterpolationSegment: "\(Int(value))\(self.suffixString)"/*Int(value)*/)
            }
            else {
                label.text = String.init(stringInterpolationSegment: "\(value)\(self.suffixString)"/*value*/)
            }**

            if oldValue != value {
                sendActions(for: .valueChanged)
            }
        }
    }

它显示'else if'和'else'语句的错误

  

错误:参数标签'(stringInterpolationSegment :)'不匹配   任何可用的重载。

0 个答案:

没有答案