Ios 顶部带有UIModalPresentationPageSheet的圆形UIWebView会导致损坏

Ios 顶部带有UIModalPresentationPageSheet的圆形UIWebView会导致损坏,ios,cocoa-touch,Ios,Cocoa Touch,我有一个UIWebView,它使用以下代码对其应用圆角: self.bodyWebView = [[UIWebView alloc] initWithFrame:webViewFrame]; self.bodyWebView.backgroundColor = [UIColor clearColor]; self.bodyWebView.delegate = self; self.bodyWebView.scalesPageToFit = YES; self

我有一个UIWebView,它使用以下代码对其应用圆角:

self.bodyWebView = [[UIWebView alloc] initWithFrame:webViewFrame];
self.bodyWebView.backgroundColor     = [UIColor clearColor];
self.bodyWebView.delegate            = self;
self.bodyWebView.scalesPageToFit     = YES;
self.bodyWebView.scrollView.bounces  = YES;
self.bodyWebView.scrollView.delegate = self;
self.bodyWebView.scrollView.layer.backgroundColor = [UIColor scrollViewTexturedBackgroundColor].CGColor;
self.bodyWebView.layer.cornerRadius = 3.0;
self.bodyWebView.clipsToBounds = YES;
self.bodyWebView.layer.shadowColor = [UIColor grayColor].CGColor;
self.bodyWebView.layer.shadowOffset = CGSizeMake(0.0,1.0);
self.bodyWebView.layer.shadowRadius = 1.0;
self.bodyWebView.layer.shadowOpacity= 1.0;
self.bodyWebView.layer.opacity = 1.0;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
navigationController.modalPresentationStyle = UIModalPresentationPageSheet;
self.navigationController presentModalViewController:navigationController animated:YES];
我发现这正确地绘制了带有圆角的UIWebView,但在iPad上,当我用以下代码在顶部显示视图控制器时会发生这样的情况:

self.bodyWebView = [[UIWebView alloc] initWithFrame:webViewFrame];
self.bodyWebView.backgroundColor     = [UIColor clearColor];
self.bodyWebView.delegate            = self;
self.bodyWebView.scalesPageToFit     = YES;
self.bodyWebView.scrollView.bounces  = YES;
self.bodyWebView.scrollView.delegate = self;
self.bodyWebView.scrollView.layer.backgroundColor = [UIColor scrollViewTexturedBackgroundColor].CGColor;
self.bodyWebView.layer.cornerRadius = 3.0;
self.bodyWebView.clipsToBounds = YES;
self.bodyWebView.layer.shadowColor = [UIColor grayColor].CGColor;
self.bodyWebView.layer.shadowOffset = CGSizeMake(0.0,1.0);
self.bodyWebView.layer.shadowRadius = 1.0;
self.bodyWebView.layer.shadowOpacity= 1.0;
self.bodyWebView.layer.opacity = 1.0;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
navigationController.modalPresentationStyle = UIModalPresentationPageSheet;
self.navigationController presentModalViewController:navigationController animated:YES];
发生的情况是,在iPad上,从底层UIWebView到UIWebView上方显示的视图控制器有颜色溢出。可以通过删除clipsToBounds=YES来修复此问题,但此时UIWebView将失去圆角

我想知道是否有其他人看到了这一点,这是否可以修复