线程1:信号SIGABRT Xcode 6.1

线程1:信号SIGABRT Xcode 6.1,xcode,swift,Xcode,Swift,我正在运行一个应用程序,在AppDelegate类中,我得到一个错误线程1:SIGABRT,该行声明class AppDelegate:UIResponder,UIApplicationLegate{ 错误消息显示2014-12-29 18:10:03.687 Iphone应用程序学习[1160:144441]***由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[setValue:forUndefinedKey::]:该类不符合key TextField的

我正在运行一个应用程序,在AppDelegate类中,我得到一个错误线程1:SIGABRT,该行声明
class AppDelegate:UIResponder,UIApplicationLegate{
错误消息显示2014-12-29 18:10:03.687 Iphone应用程序学习[1160:144441]***由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[setValue:forUndefinedKey::]:该类不符合key TextField的键值编码。”
***第一次抛出调用堆栈:
(
0 CoreFoundation 0x000000010ad96f35例外预处理+165
1 libobjc.A.dylib 0x000000010c8dabb7 objc_异常_抛出+45
2 CoreFoundation 0x000000010ad96b79-[N异常提升]+9
3基金会0x000 000 010B1AE7B3- [ NSObjices(NSKEY ValueCoDIN)SETValue:FordK::] + 259
4 CoreFoundation 0x000000010ace0e80-[NSArray makeObjectsPerformSelector:+224
5 UIKit 0x000000010b8e7c7d-[UINib实例化所有者:选项:][1506
6 UIKit 0x000000010b746f98-[UIViewController\u loadViewFromNibNamed:bundle:][242
7 UIKit 0x000000010b747588-[UIViewController loadView]+109
8 UIKit 0x000000010b7477f9-[UIViewController loadViewIfRequired]+75
9 UIKit 0x000000010b747c8e-[UIViewController视图]+27
10 UIKit 0x000000010b666ca9-[UIWindow AddRootViewControllerServiceWifPossible]+58
11 UIKit 0x000000010b667041-[UIWindow\u setHidden:强制:][247
12 UIKit 0x000000010b67372c-[UIWindow makeKeyAndVisible]+42
13 UIKit 0x000000010b61e061-[UIApplication\u callInitializationDelegatesForMainScene:transitionContext:+2628
14 UIKit 0x000000010b620d2c-[UIApplication\u在主场景中运行:transitionContext:completion:+1350
15 UIKit 0x000000010b61fbf2-[UIApplication WorkspaceDiEndTransaction:][179
16 FrontBoardServices 0x000000010e4672a3 \uuu 31-[FBSSerialQueue performAsync:]\u block\u invoke+16
17 CoreFoundation 0x000000010accc53c\uuuu CFRUNLOOP\u正在调用\u OUT\u到\u块\uuuu+12
18 CoreFoundation 0x000000010acc2285\uuu CFRunLoopDoBlocks+341
19 CoreFoundation 0x000000010acc2045\uuuu CFRunLoopRun+2389
20 CoreFoundation 0x000000010acc1486 CFRunLoopRunSpecific+470
21 UIKit 0x000000010b61f669-[UIApplication\u run]+413
22 UIKit 0x000000010b622420 UIApplicationMain+1282
23 Iphone应用程序学习0x000000010abb197e顶级代码+78
24 Iphone应用程序学习0x000000010abb19ba main+42
25 libdyld.dylib 0x000000010d0b4145开始+1
)
libc++abi.dylib:以NSException类型的未捕获异常终止
(lldb)
AppDelegate类类似于以下“导入UIKit”

@UIApplicationMain 类AppDelegate:UIResponder、UIApplicationLegate{

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    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.
}

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:.
}
}

视图控制器看起来像这样
import-UIKit

类ViewController:UIViewController{

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}
} `
我正在模拟器中测试,这可能因为我没有iOS开发人员程序而无法工作吗?

看起来您与一个不再存在的插座有一个长期连接。也许您删除了以前设置的文本字段

Ctrl-/右键单击Xcode编辑器中的文件所有者,查找警告三角形。清除该警告三角形(通过删除连接或将其重新连接到正确的插座),您可能会感觉良好


看起来您与一个不存在的插座有一个长期连接。也许您删除了以前设置的文本字段

Ctrl-/右键单击Xcode编辑器中的文件所有者,查找警告三角形。清除该警告三角形(通过删除连接或将其重新连接到正确的插座),您可能会感觉良好


这里可能还有另一个原因:您制作了一个插座,然后更改了其名称或使用新名称添加了另一个插座

您可以通过以下方式进行检查:

单击你放在故事板中的标签或按钮元素,查看右侧栏,找到“显示连接检查器”,然后你可以找到它的连接

如果你只是在连接上犯了一些错误,它会在这里告诉你


对我来说,我用一个插座创建了两个连接,这就是为什么我不断出现错误。在我删除一个错误连接后,它成功编译。

这里可能还有另一个原因:您创建了一个插座,然后更改了它的名称或使用新名称添加了另一个插座

您可以通过以下方式进行检查:

单击你放在故事板中的标签或按钮元素,查看右侧栏,找到“显示连接检查器”,然后你可以找到它的连接

如果你只是在连接上犯了一些错误,它会在这里告诉你


对我来说,我用一个插座创建了两个连接,这就是为什么我不断出现错误。在我删除了一个错误的连接后,它成功地编译了。

Main.storyboard
中,我选择了我的文本字段,然后在最右边我的
实用程序显示并选择了
显示连接检查器在
参考插座
第一节中,re选择了两个连接:

  • 编号视图控制器
  • 进入文本视图控制器
  • 我只是在我的
    enterText View Controller
    上选择了
    x
    标记来删除它(因为