Trying to hide/show text field on ViewCont A, from popover(ViewCont B) with table view

59 views Asked by At

there are some variations of this question out there but none seem to help. I have two View controller.

View Controller (A) has a text field in it. This text field needs to show/hide depending on the indexPath.row that is selected from a tableView that resides in a popover view (B).

Please help.

in my .h file of the vc where the text field resides:

@interface GlobalPageSideDetailViewController : BaseViewController 

<UITextFieldDelegate, UIAlertViewDelegate,UIPopoverControllerDelegate>

@property (strong, nonatomic) IBOutlet UITextField *otherTextField;



in .m of where popover (with table view) resides:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    NSLog(@"For table View in popover: %ld", (long)indexPath.row);

    if (indexPath.row == 3) {
        //otherTextField.hidden = false;

        //trying to hide/show text field here



    }

}

any help would be appreciated. Thanks!!

0

There are 0 answers