1

I have a series of buttons placed horizontally (say 5 in number) on top in my first View Controller. When I click on one of the five buttons , another view from a different controller (say Second View Controller ) should appear.

SecondViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondVC"];
[self.navigationController pushViewController:controller animated:YES];

But this covers entire First View. Is there a way so that my second view appears as a pop up with the series of buttons still visible and working?

2 Answers2

2

If you are trying to show the viewcontroller without covering the whole screen try adding it as subview to the view controller.

  SecondViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondVC"];
controller.view.frame=CGRectMake(50,50,100,100);
[self.view addSubview:controller.view];
1

You can use MJPopupViewController. Try this it will solve your problem. You can download it from here:-

https://github.com/martinjuhasz/MJPopupViewController

Dheeraj Kumar
  • 490
  • 3
  • 12