I have a very simple code that reads text from a text field when the user clicks a button and updates the text on the shortcut. I have a type of input field installed on a digital panel.
import UIKit
class ViewController: UIViewController {
@IBOutlet var userGuessTextField: UITextField!
@IBOutlet var resultLabel: UILabel!
@IBAction func guess(sender: AnyObject) {
let randomNumber = String(arc4random_uniform(11))
if randomNumber == userGuessTextField.text {
resultLabel.text = "You're right"
} else {
resultLabel.text = "Wrong! It was a \(randomNumber)"
}
}
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
When I run my action, xCode throws this error:
Unable to find a keyboard that supports Type 4 keyboard for iPhone-PortraitTruffle-digital keypad; using 675849259_PortraitTruffle_iPhone-Simple-Pad_Default
EDIT:
It turns out that this is not a mistake at all, but a simple logging instruction. I must have accidentally set a breakpoint in my action, giving it the look and loss of a crash. Thanks, first responder.
source
share