App Delegate iOS 8编程出错

时间:2015-01-07 14:34:58

标签: ios swift

我的app委托文件中出现错误,我不确定是什么导致它。构建成功但是一旦打开就崩溃,这是我收到的消息:

2015-01-07 10:31:20.043 Youth Xplosion [4386:672604]无法加载带有标识符“com.example.Youth-Xplosion”的包中nib引用的“(null)”图像 2015-01-07 10:31:20.085 Youth Xplosion [4386:672604] ***由于未捕获的异常'NSUnknownKeyException'终止应用程序,原因:'[setValue:forUndefinedKey:]:此类不符合键值编码关键的一天。'

我正在搞乱我的发布屏幕,所以我不确定我是否在我的故事板中弄乱了某些东西或其他东西。

这是我的app委托文件:

导入UIKit

@UIApplicationMain class AppDelegate:UIResponder,UIApplicationDelegate {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

return true
}

func applicationWillResignActive(application: UIApplication) {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.

    let notification: UILocalNotification = UILocalNotification()
    notification.timeZone = NSTimeZone.defaultTimeZone()

    let dateTime = NSDate()
    notification.fireDate = dateTime
    notification.alertBody = friday1


    UIApplication.sharedApplication().scheduleLocalNotification(notification)

    let notification1: UILocalNotification = UILocalNotification()
    notification.timeZone = NSTimeZone.defaultTimeZone()

    let dateTime1 = NSDate()
    notification1.fireDate = dateTime
    notification1.alertBody = saturday1


    UIApplication.sharedApplication().scheduleLocalNotification(notification1)
    */




}

func applicationWillEnterForeground(application: UIApplication) {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


//Notification Messages
let friday1 = "First Service of YX 2015 begins in 1 hour!"
let friday2 = "First Service in 10 minutes!"

let saturday1 = "WAKE UP DEVOTIONS START IN 1 HOUR"

}

0 个答案:

没有答案