NSData *gifFile = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"text" ofType:@"gif"]]; _mywebview.scalesPageToFit = YES; [_mywebview loadData:gifFile MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];
html
NSString *html = @"<html><head><body><img src="text.gif"><body></head></html>"; NSString *path = [[NSBundle mainBundle] resourcePath]; NSURL *baseURL = [NSURL fileURLWithPath:path]; //_mywebview.scrollView.bounces = NO; _mywebview.scalesPageToFit = YES; //_mywebview.scrollView.scrollEnabled = NO; [_mywebview loadHTMLString:html baseURL:baseURL];