Well, I'm having an error in the following code. The error is in the switch, the following error appears:
expected declaration.
What to do?
import UIKit
class ViewControllerAnalseOP1: UIViewController, UITextViewDelegate {
var indice: Int?
var string1 = "Primeira String"
var string2 = "Segunda String"
@IBOutlet weak var descricao: UITextView!
switch indice {
case 0:
descricao.text = string1
case 1:
descricao.text = string2
default:
descricao.text = "Not Found"
}
func textViewShouldBeginEditing(descricao: UITextView) -> Bool {
return false
}
override func viewDidLoad() {
super.viewDidLoad()
descricao.delegate = self
}
}