Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Redraw UIWebView

ShoopyShoopy Posts: 69Registered Users
Hi all,

After loading my UIWebView I'm zooming and scrolling programmatically. This results in a blurry UIWebView. When i pinch the UIWebView it redraws itself and the web content isn't blurry. How can I manually redraw the UIWebView so I can manually zoom and scroll without a blurry view?
Post edited by Shoopy on

Replies

  • smithdale87smithdale87 Posts: 4,294iPhone Dev SDK Supporter
    Apple Docs" said:
    When the actual content of your view changes, it is your responsibility to notify the system that your view needs to be redrawn. You do this by calling your view’s setNeedsDisplay or setNeedsDisplayInRect: method of the view. These methods let the system know that it should update the view during the next drawing cycle. Because it waits until the next drawing cycle to update the view, you can call these methods on multiple views to update them at the same time.
    From the docs..
  • ShoopyShoopy Posts: 69Registered Users
    smithdale87;437622 said:
    From the docs..
    i already used this method but its not working for me.

    when done zooming i call

    [webview setNeedsDislapay]

    or

    [webview.scrollview setNeedsDisplay]

    still blurry images though
  • smithdale87smithdale87 Posts: 4,294iPhone Dev SDK Supporter
    I suppose you should have stated that in your original post. Otherwise, people (like myself) are suggesting solutions that you've already tried. And that's just wasting everyone's time.

    Have you tried setNeedsLayout ?
  • ShoopyShoopy Posts: 69Registered Users
    smithdale87;437632 said:
    I suppose you should have stated that in your original post. Otherwise, people (like myself) are suggesting solutions that you've already tried. And that's just wasting everyone's time.

    Have you tried setNeedsLayout ?
    same problem.. I use the UIWebView delegate btw



    - (void)webViewDidFinishLoad:(UIWebView *)webView {
    [self removeLoadingScreen];
    [self setWebviewContent]; //set zoom scale and content offset
    [self.view addSubview:webView];
    [webView.scrollView setNeedsDisplay]; // is this the right place?
    }

Sign In or Register to comment.