Тег ‘UIWebView’:

Transparent UIWebView

Transparent UIWebView 123webView.opaque = NO; webView.backgroundColor = [UIColor clearColor]; [webView loadHTMLString:@"<html><body style=\"background-color: transparent\">…</body></html>" baseURL:nil];

Теги: ,

Комментарии отсутствуют

touchBegan/touchEnd in custom UIWebView

The main disadvantage in the object UIWebView is lack of methods touchBegan and touchEnd. But this question has been settled by some manipulations with privates possibilities:) Thank you Satoshi Nakagawa :) PSWebView.h – empty 12345#import <uikit /UIKit.h> @interface PSWebView : UIWebView @end </uikit> If you need add method touchBegan then make step by step 1. [...]

Теги: , , , , , ,

Комментариев (10)

UIWebView get size of content and position of scroll

Simple example get size of content and position of scroll for UIWebView! 123456int scrollPosition = [[webView stringByEvaluatingJavaScriptFromString:@"window.pageYOffset"] intValue]; int sizePage = [[webView stringByEvaluatingJavaScriptFromString:@"document.getElementById(\"foo\").offsetHeight;"] intValue]; //Scroll UIWebView to point [webView stringByEvaluatingJavaScriptFromString: [NSString  stringWithFormat:@"window.scrollBy(0,%d);", 100] ];

Теги: , , , ,

Комментарии отсутствуют