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.
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:
When remove second view controller don’t forgot to userInteractionEnabled to YES which were made NO: