Iphone UITextView委托方法未触发
我的UITextView委托方法未启动Iphone UITextView委托方法未触发,iphone,ios,delegates,uitextview,Iphone,Ios,Delegates,Uitextview,我的UITextView委托方法未启动 UILabel *fieldLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 290, 20)]; fieldLabel.text = nodeproperty.name; [rowsInSectionLabels addObject:fieldLabel]; UITextView *textViewStatus = [[UITextView alloc] initWithFrame:CGRec
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>
有什么想法吗
我的所有其他委托方法都能很好地工作好吧,我在使用枚举时犯了一个愚蠢的错误,将UITextView添加到视图中,我有一个if语句,它添加了textview或textfield,而添加textview的if语句没有按预期工作,all works now好的,我在枚举中犯了一个愚蠢的错误,将UITextView添加到视图中,我有一个if语句,它添加了一个textview或textfield,如果添加textview没有按预期工作,那么all works now键盘是否显示?是否启用了断点?您是否实现了-BOOLtextViewShouldBeginEditing:UITextView*textView返回YES?这不是必需的,但如果它被触发,您可以尝试。键盘确实显示,我可以在UITextView中键入,即使委托方法没有被触发,是的断点已启用,我在该视图中还有其他断点,我捕获了该textView如何添加到WorkflowViewController的视图中?看起来你是按程序做的。你有没有提到过它的属性,iVar?键盘显示了吗?是否启用了断点?您是否实现了-BOOLtextViewShouldBeginEditing:UITextView*textView返回YES?这不是必需的,但如果它被触发,您可以尝试。键盘确实显示,我可以在UITextView中键入,即使委托方法没有被触发,是的断点已启用,我在该视图中还有其他断点,我捕获了该textView如何添加到WorkflowViewController的视图中?看起来你是按程序做的。伊瓦尔,你有没有提到过它的财产?
- (void)textViewDidBeginEditing:(UITextView *)textView
{
MultilineTextViewController *multiLineText = [[MultilineTextViewController alloc] init];
[self presentModalViewController:multiLineText animated:YES];
}