@@ -105,8 +105,9 @@ - (void)showInApp {
105105 if (!navController) {
106106 navController = [[UINavigationController alloc ] initWithRootViewController: self ];
107107 navController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
108- navController.presentationController .delegate = self;
109108 }
109+ navController.presentationController .delegate = self;
110+
110111 if (!viewControllerForPresentation) {
111112 viewControllerForPresentation = [[UIViewController alloc ] init ];
112113 [[viewControllerForPresentation view ] setBackgroundColor: [UIColor clearColor ]];
@@ -122,8 +123,9 @@ - (void)showInApp {
122123
123124 UIWindow* mainWindow = [[UIApplication sharedApplication ] keyWindow ];
124125
125- if (!viewControllerForPresentation.view .superview )
126+ if (!viewControllerForPresentation.view .superview ) {
126127 [mainWindow addSubview: [viewControllerForPresentation view ]];
128+ }
127129
128130 @try {
129131 [viewControllerForPresentation presentViewController: navController animated: YES completion: nil ];
@@ -133,11 +135,15 @@ - (void)showInApp {
133135
134136- (void )clearWebView {
135137 [_webView loadHTMLString: @" " baseURL: nil ];
136- if (viewControllerForPresentation)
138+ if (viewControllerForPresentation) {
139+ [OneSignal onesignal_Log: ONE_S_LL_VERBOSE message: @" clearing web view" ];
137140 [viewControllerForPresentation.view removeFromSuperview ];
141+ }
142+
138143}
139144
140145- (void )presentationControllerDidDismiss : (UIPresentationController *)presentationController {
146+ [OneSignal onesignal_Log: ONE_S_LL_VERBOSE message: @" presentation controller did dismiss webview" ];
141147 [self clearWebView ];
142148}
143149
0 commit comments