Question

I have a textfield in my view. Below that I have created a view and I placed tableview in that view. The table view height is not constant it is coming from service but while entering data in text field there is no problem bcoz table view is visible. I have selected one row but if I want to change the textfield again, I am deleting data in textfield when there is no data in my text field still tableview is visible.

       - (void)textFieldDidBeginEditing:(UITextField *)textField {



          }

Are there any modifications still I'm missing in textfield should change character method? what shall i write in this method .Thank you.

Was it helpful?

Solution

you should also wirte this in your text field delegate method.

if ( [textField.text isEqualToString:@""]) 
{
   yourTableView.hidden=YES;
    return;
}
else
{
  yourTableView.hidden=NO;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top