Strange scrolling behavior of a native web view on iOS

I have a a very simple scene with one game object which has a script attached that shows a GUI with a few buttons and labels.

When the user clicks one of the buttons, some iOS native code is called which inits and shows a full screen UIWebView and attaches it to the current window, more or less like this:

CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame];
UIWebView* webView = [[UIWebView alloc] initWithFrame:applicationFrame];
[[[UIApplication sharedApplication] keyWindow] addSubview:webView];

All of this works as expected. The one non-optimal thing I’m seeing is that, when scrolling the contents of the UIWebView, it often seems to lag behind my finger, sometimes it stops behaving like a physical scroll with inertia (it gets stuck as soon as I lift the finger off the screen), and sometimes it gets stuck on the overscroll area (it doesn’t bounce and the margin remains visible).

The device’s processor usage seems to remain relatively low the whole time.

I’ve tried to disable the Repaint method of the Unity’s generated file, as described on under the Performance Gotchas section. I didn’t notice any improvement.

I’ve also tried to attach the UIWebView to Unity’s GL view instead of adding it directly to the window’s subviews. Couldn’t notice any difference either.

Do you think there’s a way of getting normal performance on a full screen iOS native scroll or web view shown within a Unity application?

I had the same problem. In addition to the unreliable scrolling, some links didn’t work. Both problems seem to have been solved by
changing a line in AppController.m:

Change this line




I have used following plugins for web view in iOS and Android

iOS : Web View in iOS | Integration | Unity Asset Store

Android : Web View for Android | Integration | Unity Asset Store