2014-07-17 154 views
3
// 
// main.m 
// Journey 
// 
// Created by Julian Buscema on 2014-07-13. 
// Copyright (c) 2014 Julian Buscema. All rights reserved. 
// 

#import <UIKit/UIKit.h> 

#import "AppDelegate.h" 

int main(int argc, char * argv[]) 
{ 
    @autoreleasepool { 
     return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 
    } 
} 

當我嘗試運行我的申請,我的main.m文件打開和「返回UIApplicationMain ......」線是綠色線程說1加亮:信號SIGABRT。我google了它,它說它必須做我的AppDelegate.h文件,但它的哪一部分?線程1:信號SIGABRT - AppDelegate.h

這就是:

// 
// AppDelegate.h 
// Journey 
// 
// Created by Julian Buscema on 2014-07-13. 
// Copyright (c) 2014 Julian Buscema. All rights reserved. 
// 

#import <UIKit/UIKit.h> 

@interface AppDelegate : UIResponder <UIApplicationDelegate> 

@property (strong, nonatomic) UIWindow *window; 

@end 
+0

P.S.我的項目中沒有錯誤或警告。 – Julian

+2

請參閱http://raywenderlich.com/10209/my-app-crashed-now-what-part-1以瞭解如何調試和發現問題。 – rmaddy

+1

你的代碼是好的。請向我們展示AppDelegate.m文件。 –

回答

2

你的錯誤說:this class is not key value coding-compliant for the key username.

東西是不正確名爲username.你創建Storybaord到您的ViewController網點元素?如果你做了,你是否在ViewController中重命名了屬性?

嘗試右鍵單擊UITextField並檢查插座。空的白色圓圈意味着你的插座壞了,它必須是白色的。

+0

http://imgur.com/xlrXo0K我把這兩個圖像都放在這裏的兩個用戶名文本字段。所以我不知道在發現錯誤後我應該怎麼做......對於所有問題,我都很抱歉。 – Julian

+0

@朱連不要對不起。你有3場景。請點擊相同的檢查。 –

+0

感謝您的耐心,我非常感謝。第三個場景是空白的,它只是一個圖像。這裏是我的ViewController的:http://pastebin.com/zEaLVF3X,http://pastebin.com/Gx5wYktQ – Julian