Não é possível chamar o valor do tipo não funcional 'String'
Estou tentando passar a variável ILTItem para o meu ILTViewController, acionado por AppDelegate.swift quando o usuário inicia o aplicativo por meio de um link direto.
O código em que tenho erros:
Não é possível chamar o valor do tipo não funcional 'String'
na linha em que eu definoilt
.
Aqui está o código que tenho no momento:
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
var ilt = ILT(homeworkID: 1234, title: "History ILT", subject: "History", teacher: "Miss A Smith", teacherCode: "asmith", studentID: 12345, description: "Description....", due: 1450137600, status: "In Progress", hasAttachments: true)
var newVC = ILTViewController()
newVC.ILTitem = ilt
appDelegate.window?.addSubview(newVC.view)
Por que isso poderia ser? Na minha classe ILTViewController, tenho:
class ILTViewController: UIViewController {
// accept the incoming ILT struct
var ILTitem: ILT!
Declaração Estrutural IlT:
struct ILT {
let homeworkID: Int
let title: String
let subject: String
let teacher: String
let teacherCode: String
let studentID: Int
let description: String
let due: Double
let status: String
let hasAttachments: Bool
}