0

I used find() to reference two arrays of Floats in Swift 1, but cannot find the equivalent for Swift 3. I've tried indexOf and array.first with no luck. I've been unable to find any other alternatives. Can someone provide some guidance here? I'm not a professional programmer and I wrote this app to help design eye prosthetics. It worked perfectly until I updated Xcode and have had to fix about 50 issues... Never again. Any help would be greatly appreciated.

 @IBAction func unitsPressed(_ sender: UIButton) {

    let unitsAlertView = UIAlertController(title: "Units Selector", message: nil, preferredStyle: UIAlertControllerStyle.alert)

    let mmAction = UIAlertAction(title: "millimeters", style: UIAlertActionStyle.default){
        (ACTION) in

            self.dioptorsOn = false

            self.diagnosticLensPicker.reloadAllComponents()

            if var baseCurveIndex = find(self.baseCurveArrayMM, self.chosenBaseCurveSphereMM) {  // issue is here - use of unresolved identifier "find"

            self.diagnosticLensPicker.selectRow(baseCurveIndex, inComponent: 0, animated: true)

        }

        self.unitsLabel.text = "units: mm"

    }
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
NoClue
  • 211
  • 4
  • 13
  • As I referenced in my question, I had attempted to use the information presented in the post you referenced, to no avail. – NoClue Nov 26 '17 at 01:04
  • I agree that this isn't an exact duplicate. The question should be re-opened. – MAH Jan 24 '18 at 21:56

0 Answers0