I am making a joke app for friends and to improve my swift coding by making a LoveCalculator. The calculator finds the length of the two names of the lovers, times the lengths together, then takes that number away from 100, giving your love percentage. However, each time I try the app, it displays the number -40906 each time. Any ideas? I have tried changing the UITextField to String conversion method. I am quite a novice at swift, any help would by appreciated!
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var outputLabel: UILabel!
@IBOutlet weak var personOne: UITextField!
@IBOutlet weak var personTwo: UITextField!
@IBAction func calculateButton(sender: AnyObject) {
var one = toString(personOne)
var two = toString(personTwo)
var oneLength = countElements(one)
var twoLength = countElements(two)
var firstCalc = oneLength * twoLength
var finalCalc = 100 - firstCalc
outputLabel.text = "%\(finalCalc)"
}