我是新开发的iOS。 我有这样的错误...“线程1:断点1.1”。如何修复这个错误:如何解决Xcode中的线程错误?
这是头(.h)文件
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *passwordTextField;
@property (weak, nonatomic) IBOutlet UITextField *usernameTextField;
- (IBAction)tekan:(id)sender;
@end
这是实现(.M)文件
//
// ViewController.m
// Example1
//
// Created by Andika Kurniawan on 10/6/14.
// Copyright (c) 2014 Indonative. All rights reserved.
//
#import "ViewController.h"
@interface ViewController()
@end
@implementation ViewController
@synthesize passwordTextField;
- (void)viewDidLoad {
[super viewDidLoad];
self.passwordTextField.delegate = self;
self.usernameTextField.delegate = self;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)tekan:(id)sender {
UIAlertView *helloEarthInputAlert = [[UIAlertView alloc]
initWithTitle:@"Name!" message:[NSString stringWithFormat:@"Message: %@", passwordTextField.text]
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
// Display this message.
[helloEarthInputAlert show];
}
@end
上面的代码是我的源代码。 我想修复线程错误,,但我混淆......因为我不知道我的源代码中存在什么错误。 在这个应用程序的插座和操作没有错误
我想你只需点击其中写有34行的34的蓝色标记。这是一个断点,导致您的代码在第34行停止。 – divyenduz 2014-10-06 17:09:50