0

I've upgraded my xcode and my project no longer compiles.

Error: Argument labels '(stringInterpolationSegment:)' do not match any available overloads.

It shows the error for 'else if' and 'else' statement

@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)
            }
        }
    }

It shows the error for 'else if' and 'else' statement

Error: Argument labels '(stringInterpolationSegment:)' do not match any available overloads.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
TAN
  • 11
  • 3
  • `label.text = "\(value)\(self.suffixString)"`. – rmaddy May 29 '19 at 15:43
  • Possible duplicate of [Argument labels '(stringInterpolationSegment:)' do not match any available overloads](https://stackoverflow.com/questions/55369435/argument-labels-stringinterpolationsegment-do-not-match-any-available-overl) – rmaddy May 29 '19 at 15:44

0 Answers0