Skip to content

Commit 91f3582

Browse files
authored
Fix view hierarchy on iOS (#30)
* Make it build for iOS Simulator * Fix modals in web content on iOS
1 parent 6787db6 commit 91f3582

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

webview/ext.manifest

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ platforms:
1010
frameworks: ["WebKit"]
1111

1212
armv7-ios:
13+
context:
14+
frameworks: ["WebKit"]
15+
16+
x86_64-ios:
1317
context:
1418
frameworks: ["WebKit"]

webview/src/webview_darwin.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ int Platform_Create(lua_State* L, dmWebView::WebViewInfo* _info)
191191
g_WebView.m_WebViews[webview_id] = view;
192192
g_WebView.m_WebViewDelegates[webview_id] = navigationDelegate;
193193
#if defined(DM_PLATFORM_IOS)
194-
UIView * topView = [[[[UIApplication sharedApplication] keyWindow] subviews] lastObject];
194+
UIView * topView = [[[[UIApplication sharedApplication] keyWindow] rootViewController] view];
195195
#elif defined(DM_PLATFORM_OSX)
196196
NSView * topView = [[[NSApplication sharedApplication] keyWindow] contentView];
197197
#endif

0 commit comments

Comments
 (0)