내 UITextView 편집이 완료되면 NSLog
뭔가를하고 싶습니다.UITextView가 편집 완료
나는
- (void)textViewDidEndEditing:(UITextView *)textView
- (BOOL)textViewShouldEndEditing:(UITextView *)textView
및
을 시도하지 어느 쪽도 일했다.수정 :
myTextView.delegate = self;
내 UITextView 편집이 완료되면 NSLog
뭔가를하고 싶습니다.UITextView가 편집 완료
나는
- (void)textViewDidEndEditing:(UITextView *)textView
- (BOOL)textViewShouldEndEditing:(UITextView *)textView
및
을 시도하지 어느 쪽도 일했다.수정 :
myTextView.delegate = self;
당신이 당신의 텍스트 뷰의 대리자를 설정합니까?
수정 :이 같은 .H 파일에
설정된 대표 :
#import <UIKit/UIKit.h>
@interface TextViewController : UIViewController <UITextViewDelegate>
{
UITextView *textView;
}
@property (nonatomic, retain) UITextView *textView;
@end
당신의 UITextField 대신 UITextFieldDelegate하지 UITextViewDelegate을 사용해야합니다 사용하는 경우. 그리고이 방법 대신 내 문제가 해결되었습니다.
- (void)textFieldDidEndEditing:(UITextField *)textField
나는 대답을 수락합니다. 빠른 답변 감사합니다. – atomikpanda
그리고 .h 파일의 위임 설정을 잊지 마십시오. –
.h 파일에서 어떻게 설정할 수 있습니까? – atomikpanda