problema con la carga del controlador de vista

I have two view controller's first which show's gird of button's and second the detailed view when clicking on any button for first View Controller i am loading detailed view controller.

   secondViewController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]];
    [secondViewController setFrame:CGRectMake(300, 60, 430, 620)];
    [self.view addSubview:secondViewController.view];

which need to appear on first view controller and setting frame and adding to second view controller.

When i load[add] my second view controller to the first. Its allow me tap on other button's too i need to restrict on taping on any button when its loaded second view controller.

preguntado el 24 de agosto de 12 a las 09:08

when you add the second viewController the first one is still visible? -

@AndreyChernukha it need to visible! i need to had some kind of has on that! -

2 Respuestas

add a overlay on first view and on it add the second view then your buttons will not be accessible.refer

Respondido 01 Jul 17, 07:07

When second view controller added as subview then make all as many buttons u have make userInteractionEnabled to NO which u think not to be taped:

 yourButton.userInteractionEnabled = NO;

When remove second view controller don't forgot to userInteractionEnabled to YES which were made NO:

 yourButton.userInteractionEnabled = YES;

Respondido 24 ago 12, 09:08

its working fine! the same issue i am getting on gestures! now i create grid of view on tap on any grid view i have same issue can you advice me how to fix it! - Kiran

which issue do u have description ? - Paresh Navadiya

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.