gpt4 book ai didi

iphone - UITextView 确实结束了编辑

转载 作者:太空狗 更新时间:2023-10-30 03:57:52 25 4
gpt4 key购买 nike

当我的 UITextView 完成编辑时,我想 NSLog 一些东西。

我试过了

- (BOOL)textViewShouldEndEditing:(UITextView *)textView

- (void)textViewDidEndEditing:(UITextView *)textView

都没有用。

修复:

myTextView.delegate = self;

最佳答案

您是否设置了您的 textview 的委托(delegate)?

修复:

像这样在 .h 文件中设置委托(delegate):

#import <UIKit/UIKit.h>  

@interface TextViewController : UIViewController <UITextViewDelegate>
{
UITextView *textView;
}
@property (nonatomic, retain) UITextView *textView;
@end

关于iphone - UITextView 确实结束了编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12925579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com