Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:12:34+00:00 2026-06-14T02:12:34+00:00

I am facing this weird problem not in a normal behavior. I am loading

  • 0

I am facing this weird problem not in a normal behavior. I am loading the images from a url in the web-view. If I change the Orientation from portrait to landscape and landscape to portrait no problem. But In Portrait If I do some zoom-in , zoom-out and double tap the image to fit in the screen, then if I change to Landscape now, I can see there is white/black screen is coming in the right side.

I have googled about this issue, I tried many ways like Opaque property, clear color etc. Even I tried my own way to resolve this , but I failed. How to fix the issue ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:12:35+00:00Added an answer on June 14, 2026 at 2:12 am

    I am posting this because i have also faced the same problem ,I have fixed that issue too and my code is as below.Here Below is the Whole Code Which can Solve the Issue.Need To properly Put ALl code in ViewControler

    For This I set the Pinch Gesture so that when User Skew The UIwebView could check the Scaled size of UIwebView.

         //One This Please import The `UIGestureRecognizerDelegate` Protocol in '.h file' 
    
         //call below method in ViewDidLoad Method for setting the Pinch gesture 
    
        - (void)setPinchgesture
        {
         UIPinchGestureRecognizer * pinchgesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(didPinchWebView:)];
    
        [pinchgesture setDelegate:self];
    
        [htmlWebView addGestureRecognizer:pinchgesture];
        [pinchgesture release];
       // here htmlWebView is WebView user zoomingIn/Out 
    
       }
    
     //Allow The allow simultaneous recognition
    
        - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer   *)otherGestureRecognizer
       {
         return YES;
       }
    

    Returning YES is guaranteed to allow simultaneous recognition. returning NO is not guaranteed to prevent simultaneous recognition, as the other gesture’s delegate may return YES

     -(void)didPinchWebView:(UIPinchGestureRecognizer*)gestsure
       {
       //check if the Scaled Fator is same is normal scaling factor the allow set Flag True.
        if(gestsure.scale<=1.0)
        {
        isPinchOut = TRUE;
    
        }
        else// otherwise Set false
        {
        isPinchOut = FALSE;
        }
        NSLog(@"Hello Pinch %f",gestsure.scale);
      }
    

    If User Hase Pinch In/Out The Web View in that Case Just Set THat Zooming Factor .
    SO that WebView Can Adjust Its ContentSize as Oreintaion Changed.

        - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation   duration:(NSTimeInterval)duration {
    
       //Allow the Execution of below code when user has Skewed the UIWebView and Adjust the Content Size of UiwebView.
    
      if(isPinchOut){
      CGFloat ratioAspect = htmlWebView.bounds.size.width/htmlWebView.bounds.size.height;
      switch (toInterfaceOrientation) {
        case UIInterfaceOrientationPortraitUpsideDown:
        case UIInterfaceOrientationPortrait:
            // Going to Portrait mode
            for (UIScrollView *scroll in [htmlWebView subviews]) { //we get the scrollview
                // Make sure it really is a scroll view and reset the zoom scale.
                if ([scroll respondsToSelector:@selector(setZoomScale:)]){
                    scroll.minimumZoomScale = scroll.minimumZoomScale/ratioAspect;
                    scroll.maximumZoomScale = scroll.maximumZoomScale/ratioAspect;
                    [scroll setZoomScale:(scroll.zoomScale/ratioAspect) animated:YES];
                }
            }
            break;
    
        default:
            // Going to Landscape mode
            for (UIScrollView *scroll in [htmlWebView subviews]) { //we get the scrollview
                // Make sure it really is a scroll view and reset the zoom scale.
                if ([scroll respondsToSelector:@selector(setZoomScale:)]){
                    scroll.minimumZoomScale = scroll.minimumZoomScale *ratioAspect;
                    scroll.maximumZoomScale = scroll.maximumZoomScale *ratioAspect;
                    [scroll setZoomScale:(scroll.zoomScale*ratioAspect) animated:YES];
                }
            }
            break;
         }
         }
    
         }
    

    This Works perfectly for even user skew the UIWebView.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this time, I'm facing a really weird problem. I've the following code: $xml =
I have created web-application using JSF 2.0 & JSP and facing some weird problem.
This is a very weird problem am facing HTML: <input type=button id=buttonobj class=some class
ohk i am facing this very weird problem . i have a cloud server
I am facing a weird problem in IE which is not happening with other
I am facing very weird problem, i made an web application for my client,
I am facing a weird problem with a text field on my page. This
I am facing this weird problem. The WebApp I'm debugging right now, is invoking
I am facing a weird problem. My web application throws error Value to add
I'm facing a very weird problem. This is map.h: #define MAP_WIDTH 256 #define MAP_HEIGHT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.