gpt4 book ai didi

iphone - UITextView 委托(delegate)方法未触发

转载 作者:行者123 更新时间:2023-12-01 16:57:52 24 4
gpt4 key购买 nike

我的 UITextView 委托(delegate)方法没有触发。

UILabel *fieldLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 290, 20)];
fieldLabel.text = nodeproperty.name;
[rowsInSectionLabels addObject:fieldLabel];
UITextView *textViewStatus = [[UITextView alloc] initWithFrame:CGRectMake(5, 25, 290, 30)];
[textViewStatus setTextAlignment:UITextAlignmentLeft];

// For the border and rounded corners
[[textViewStatus layer] setBorderColor:[[UIColor lightGrayColor] CGColor]];
[[textViewStatus layer] setShadowColor:[[UIColor grayColor] CGColor]];
[[textViewStatus layer] setBorderWidth:1];
[[textViewStatus layer] setCornerRadius:5];
[textViewStatus setClipsToBounds: YES];
textViewStatus.delegate = self;
[textViewStatus setEditable:YES];

我的界面
@interface WorkflowViewController : UIViewController <UITextFieldDelegate, UITextViewDelegate, UITableViewDataSource, UITableViewDelegate, UIPickerViewDelegate, UIPickerViewDataSource, PickerRowSelected>

我在这里添加了一个断点,什么都没有......
- (void)textViewDidBeginEditing:(UITextView *)textView
{
MultilineTextViewController *multiLineText = [[MultilineTextViewController alloc] init];
[self presentModalViewController:multiLineText animated:YES];
}

有任何想法吗?

我所有的其他委托(delegate)方法都可以正常工作

最佳答案

好的,我在枚举方面犯了一个愚蠢的错误并将 UITextView 添加到 View 中,我有一个 if 语句添加了一个 textview 或 textfield 并且如果添加 textview 没有按预期工作,现在一切正常

关于iphone - UITextView 委托(delegate)方法未触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9886560/

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