ColorPickerExample icon indicating copy to clipboard operation
ColorPickerExample copied to clipboard

Popover fails to dismiss in Landscape Orientation

Open 224XS opened this issue 7 years ago • 1 comments

In the stock version of the example in iOS 11.0.3/Swift4/XCode 9, there are two issues with the popover:

  1. presenting the popover in landscape leads to a grey area surrounding the popover, the outside area in portrait orientation is white

  2. in landscape, the popover is not dismissed by tapping outside its view. The color picker function works, but one needs to reorient to portrait to close the popover.

Any thoughts?

224XS avatar Nov 28 '17 17:11 224XS

For iOS 10 and up, add the new delegate method to the ViewController to adapt to changing traits:

	
    func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: 
UITraitCollection) -> UIModalPresentationStyle {
        return .none
    }

224XS avatar Nov 28 '17 18:11 224XS