- Home /
ios uiwebview width will not expand to full landscape
I have a simple html page with no css formatting being displayed in a uiwebview. My uiwebview in landscape mode is rotated correctly, but the size is limited to what appears to be portrait size. The app uses a landscape mode and is never in portrait mode. The UIWebView code is in a plugin that is running in unity3d. Here is the code.
UIView *view = UnityGetGLViewController().view;
webView = [[UIWebView alloc] initWithFrame:view.frame];
webView.delegate = self;
webView.opaque = NO;
webView.backgroundColor = [UIColor clearColor];
webView.hidden = YES;
webView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
[view addSubview:webView];
gameObjectName = [[NSString stringWithUTF8String:gameObjectName_] retain];
webView.autoresizesSubviews = YES;
Comment
Your answer