public override void ViewDidLoad() { base.ViewDidLoad(); _urlTextField.ShouldReturn = doReturn; _browser.Delegate = new customWebViewDelegate(this); var webDocumentView = new NSObject( Messaging.IntPtr_objc_msgSend(_browser.Handle, (new Selector("_documentView").Handle))); var webView = webDocumentView.GetNativeField("_webView"); Messaging.void_objc_msgSend_IntPtr(webView.Handle, (new Selector("setCustomUserAgent:")).Handle, (new NSString(@"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0")).Handle); /* * * /* http://d.hatena.ne.jp/KishikawaKatsumi/20090217/1234818025 NSString *userAgent = @"Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_1 like Mac OS X; ja-jp) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5F136 Safari/525.20"; id webDocumentView; id webView; webDocumentView = objc_msgSend(myWebView, @selector(_documentView)); object_getInstanceVariable(webDocumentView, "_webView", (void**)&webView); objc_msgSend(webView, @selector(setCustomUserAgent:), userAgent); */ loadURL(_startURL); }