func testExample() {
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
// some code ...
}
The above function always crash and gives this error:
Could not cast value of type 'MyAppName.AppDelegate' (0x10dc09e80) to 'MyAppNameTests.AppDelegate' (0x11cc190c0).
Aucun commentaire:
Enregistrer un commentaire