My UITextView delegate methods aren’t firing.
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];
My Interface
@interface WorkflowViewController : UIViewController <UITextFieldDelegate, UITextViewDelegate, UITableViewDataSource, UITableViewDelegate, UIPickerViewDelegate, UIPickerViewDataSource, PickerRowSelected>
I added a breakpoint here and nothing…
- (void)textViewDidBeginEditing:(UITextView *)textView
{
MultilineTextViewController *multiLineText = [[MultilineTextViewController alloc] init];
[self presentModalViewController:multiLineText animated:YES];
}
Any ideas?
All my other delegate methods work perfectly
Ok I was making a silly mistake with enums and adding the UITextView to the View, I have a if statement that adds either a textview or textfield and the if adding the textview didn’t work as expected, all works now