0

I had a UIViewController on whose view I had started an AVCaptureSession and added two UIButtons to capture photos and close the camera,

I was facing the issue that the AVCaptureSession was also getting rotated when I was rotating the device,

To solve the problem I followed the second answer on this link,

<https://stackoverflow.com/questions/7353789/ios-disable-autorotation-for-a-subview>

But after adding on the window if I am making the view on the window of the full width and height as the self.view I am not being able to see the buttons

Any suggestions how I can bring the buttons visible while adding the window view as full width and height as the view of my view controller.

Pratik Shah
  • 563
  • 4
  • 14
Avinash Sharma
  • 111
  • 1
  • 11

1 Answers1

0

You will probably have to create a subView of the "full width and height" view that you have created, and put the buttons over there (instead of in self.view).

Edit: You might also try calling bringSubViewToFront on both buttons.

Arik Segal
  • 2,963
  • 2
  • 17
  • 29