This change lets a user be able to set up a corner radius and shadow of
the surface view, and has the library not update them unnecessarily.
As a result, a user can escape "Ambiguous use of 'cornerRadius'" error
as below, if it's used with a `cornerRadius` property of `UIView`
extension defined by the user.
```swift
extension UIView {
@objc dynamic var cornerRadius: CGFloat {
get { return self.layer.cornerRadius }
set(cornerRadius) {
self.layer.masksToBounds = true
self.layer.cornerRadius = cornerRadius
}
}
}
...
public extension FloatingPanelSurfaceView {
@objc public dynamic var fp_cornerRadius: CGFloat {
get { return backgroundView.layer.cornerRadius }
set {
if #available(iOS 11.0, *) {
contentView?.layer.masksToBounds = true
contentView?.layer.cornerRadius = newValue
contentView?.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
}
backgroundView.layer.masksToBounds = true
backgroundView.layer.cornerRadius = newValue
}
}
}
```
squash! Open FloatingPanelSurfaceView.backgroundView
- Update README
- Remove FloatingPanelSurfaceWrapperView
- Remove content wrapper view of FloatingPanelSurfaceView
- Remove {setUp,tearDown}Views in FloatingPanel
- Modify timing to call FloatingPanelLayoutAdapter.checkLayoutConsistance()
- Fix invalid surface height on orientation change
- Fix a layout problem on SafeArea.Top
- Fix invalid top inset of safe area on a navigation bar with search bar
- Fix content offsets of a tracking scroll view
- Fix the content offsets on orientation change(Regression)
- Fix FloatingPanelPresentationController
- Fix intrinsic height handling
- Reduce re-rendering the surface view unexpectedly
By removing shadowPath and putting the shadow directly onto the surface view layer instead of a sublayer, the shadow doesn't affect the content view background
The floating panel controller can't resolve this issue, but the
workaround is much easy in the content view controller.
So I stop auto-rounding corners in content view on iOS 10.