質問

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.

役に立ちましたか?

解決

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

if ( [textField.text isEqualToString:@""]) 
{
   yourTableView.hidden=YES;
    return;
}
else
{
  yourTableView.hidden=NO;
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top