I have created UITextView
programatically, textview is created as required but when i try to set value for textview using tag application crashes.
I am able to set other parameter like setUserInteractionEnabled
without issue.
following the code for it..
To create textview
UITextView *textView = [[UITextView alloc]initWithFrame:CGRectMake(0,0,100,200)];
textView.font = [UIFont systemFontOfSize:30];
//textView.font = [UIFont boldSystemFontOfSize:12];
textView.backgroundColor = [UIColor grayColor];
textView.tag=i;
[textView setTextAlignment:NSTextAlignmentCenter];
textView.text=[NSString stringWithFormat:@"%d",i];
textView.inputView= [LNNumberpad defaultLNNumberpad];
textView.editable = YES;
[textView setDelegate:self];
[self.view addSubview:textView];
Changeing value in textview using tag..
UITextView *txtviewfound = (UITextView *)[self.view viewWithTag:j];
[txtviewfound setText:@"some text"];
[txtviewfound setUserInteractionEnabled:FALSE];
When i comment settext like it works fine.
If i am missing anything please let me know.
Thanks in advance