Reputation: 11
I need to display a document in a uiwebview.I was succeeded in displaying it,but i need to move the webview only vertically.I don't want the horizontal scrolling how can i achieve this..Please help me
Upvotes: 0
Views: 3584
Reputation: 29
Try this
NSString *test = [NSString stringWithFormat:@"<html><head><style>body{background-color:transparent;word-wrap:break-word;}</style></head><body>%@</body></html>",htmlBody];
[self.webView loadHTMLString:test baseURL:nil];
Upvotes: 2
Reputation: 12112
In your HTML, add the following in the <head>
section of your HTML.
<meta name="viewport" content="width=device-width" />
Upvotes: 3