UIButton does not show text in view with AVCaptureVideoPreviewLayer iOS 10

Hi All,


I have a view that acts as a QRCode scanner. The view contains an AVCaptureVideoPreviewLayer and a UIButton.


When this view displays, the text within the button does not show. It should display the word 'Cancel'. If I touch the button, or swipe the button - but not tap it, the button text will show at that point.


This benavior is limited to iOS 10.


It seems as if the button does not have focus. Has anyone else experienced this? How can I solve it?


Here is some additional detail: http://stackoverflow.com/questions/41227800/why-doesnt-my-button-text-show-when-on-top-of-avcapturevideopreviewlayer


Thanks!