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