Presentr icon indicating copy to clipboard operation
Presentr copied to clipboard

Corner radius issue with 1.3.2

Open otymartin opened this issue 6 years ago • 2 comments

@danlozano Is there something that would cause cornerRadius to not show in UIPageViewController environment?

I have a PageViewController with multiple child controllers. On initial load, there is no cornerRadius, but as soon as I scroll to the next page, corner radius appears. Its almost like a glitch.

This doesnt happen at all in 1.3.0

I tried to reproduce it in this repo but failed.

otymartin avatar May 13 '18 15:05 otymartin

I have similar issue with a normal UIViewController loaded this way: let previewVC = G8ARMediaPreviewVC.init(nibName: "G8ARMediaPreviewVC", bundle: FRAMEWORK_BUNDLE) customPresentViewController(presenter, viewController: previewVC, animated: true, completion: nil)

It never shows the rounded corners.

omarojo avatar Jun 01 '18 10:06 omarojo

Yes, sorry.

I introduced this issue in the latest version.

I removed setting .clipsToBounds = true from the presented view controller's view, so that you can round corners and set shadows using Presentr without issue.

But the problem is that if you're view has inner subviews that need to be clipped (like in a page view controller, navigation controller, etc...) you NEED to clip bounds otherwise the subview will pass through and the rounded corners will not be shown.

SO, I am looking into a fix right now so all cases are handled. It will probably be an option to toggle clips to bounds, depending on each presentation's case.

Will update soon! thanks 👍

danlozano avatar Jul 05 '18 18:07 danlozano