-1

My code is:

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var answer: UILabel!
@IBOutlet weak var minNum: UITextField!
@IBOutlet weak var maxNum: UITextField!

let min = minNum.text.toInt()

I'm getting the error: ViewController.Type does not have a member named 'minNum' How do i fix this error? (I'm new to programming)

I' using Xcode 7 beta 2

user2708570
  • 73
  • 1
  • 8

1 Answers1

-1

is that min assignment just floating?

Put that line inside your viewDidLoad, or inside the textFieldDidEndEditing function. Looks like you're trying to assign the value of a text field that doesn't exist, since it hasn't been instantiated yet.

(I wrote an answer before i realized there's not actually a question here..)

Chris Slowik
  • 2,859
  • 1
  • 14
  • 27