Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextView Not responding

Tags:

ios

uitextview

I am using textview in my code using the below code

UITextView *ObservationTextView3=[[UITextView alloc]init];
ObservationTextView3.frame=CGRectMake(45, ObservationLabel3.frame.origin.y+ObservationLabel3.frame.size.height, 410, 70);
[ObservationTextView3 setKeyboardType:UIKeyboardTypeDefault];
ObservationTextView3.font=[UIFont fontWithName:@"Helvetica" size:14];
ObservationTextView3.delegate=self;
ObservationTextView3.tag=139;
ObservationTextView3.text = @"";
ObservationTextView3.layer.borderWidth=1.0f;
ObservationTextView3.layer.borderColor=[UIColor lightGrayColor].CGColor;
ObservationTextView3.layer.cornerRadius=4.0f;
[_BeverageRoutineScroll addSubview:ObservationTextView3];

but i am unable to make this textview respond i've tried many things but evrything goes invane.

please help me out.

like image 880
Himanshu Avatar asked Feb 07 '26 13:02

Himanshu


1 Answers

Try this:

[self.view bringSubviewToFront:yourTextView];

[self.view sendSubViewToBack:yourScrollview];

OR

[self.yourScrollView setUserInteractionEnabled:YES];

[self.yourTextView setUserInteractionEnabled:YES];

OR

check your scrollView's Content Size and Text View Frame

like image 157
theiOSDeveloper Avatar answered Feb 09 '26 03:02

theiOSDeveloper