Skip to content

Commit

Permalink
Fix view hierarchy on iOS (#30)
Browse files Browse the repository at this point in the history
* Make it build for iOS Simulator

* Fix modals in web content on iOS
  • Loading branch information
dapetcu21 authored Jan 12, 2021
1 parent 6787db6 commit 91f3582
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions webview/ext.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ platforms:
frameworks: ["WebKit"]

armv7-ios:
context:
frameworks: ["WebKit"]

x86_64-ios:
context:
frameworks: ["WebKit"]
2 changes: 1 addition & 1 deletion webview/src/webview_darwin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int Platform_Create(lua_State* L, dmWebView::WebViewInfo* _info)
g_WebView.m_WebViews[webview_id] = view;
g_WebView.m_WebViewDelegates[webview_id] = navigationDelegate;
#if defined(DM_PLATFORM_IOS)
UIView * topView = [[[[UIApplication sharedApplication] keyWindow] subviews] lastObject];
UIView * topView = [[[[UIApplication sharedApplication] keyWindow] rootViewController] view];
#elif defined(DM_PLATFORM_OSX)
NSView * topView = [[[NSApplication sharedApplication] keyWindow] contentView];
#endif
Expand Down

0 comments on commit 91f3582

Please sign in to comment.