2
我的UITextView委托方法没有触发。UITextView委托方法没有触发
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];
}
任何想法?
我所有的其他委托方法工作完全
键盘是否显示?你有断点吗?你有没有实现' - (BOOL)textViewShouldBeginEditing:(UITextView *)textView'返回YES?这不是坏事,但你可以尝试,如果它被解雇。 – 2012-03-27 09:25:40
键盘显示出来,我可以键入UITextView,即使该委托方法不会被解雇,是断点被启用,我还有其他的断点也在该视图中,我赶上 – Armand 2012-03-27 09:34:49
这个textView是如何添加到视图的WorkflowViewController?看来你是以编程方式进行的。你有没有提及它(财产,iVar)? – 2012-03-27 09:45:52