ColorPickerExample
ColorPickerExample copied to clipboard
Popover fails to dismiss in Landscape Orientation
In the stock version of the example in iOS 11.0.3/Swift4/XCode 9, there are two issues with the popover:
-
presenting the popover in landscape leads to a grey area surrounding the popover, the outside area in portrait orientation is white
-
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?
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
}