ios How to use a webproxy to load uiwebview - iphone

Any of you knows how can I load a uiwebview using proxys inside of the app?
NSURL *site =[NSURL URLWithString:#"http://mydomain.com/"];
NSURLRequest *request =[NSURLRequest requestWithURL:site];
[_webLoad loadRequest:request];
I'll really appreciate your help.

I like to use this one:
https://github.com/pokeb/ProxyingUIWebView
Very simple to implement and fast to use. Take a look.

Related

How do you 'pop' a UIWebVIew?

I have a UIWebView which I load like this:
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
When I want to get rid of it, what do I code?
Thanks?
[webView removeFromSuperview]
If you are completely finished with the webView, then release it afterwards
[webView release]
It seems your problem does not have anything to do with the UIWebView itself. Perhaps you just want to know how to empty the UIWebView. I tested this:
[webview loadHTMLString:nil baseURL:nil];
Cheers,
Sascha

I am trying to open a webpage on the UIWebView

I am trying to open a webpage on the UIWebView which is secured. I am getting that error message also. But if i try to open it in safari it is giving an alert and i can continue from there forcefully. How can i implement that using UIWebView
Thanks in advance
I am not clear with your question but i understood something like you want to load a web page in UIWebView some of the snippet may use for you
UIWebView *loacalWebView=[[uiwebView alloc]initwithFrame:self.view.frame];
loacalWebView.delegate=self;
NSString *urlAddress = #"http://www.google.co.in";
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[loacalWebView loadRequest:requestObj];

how to show rss feed url in UIWebView in iphone sdk?

I am trying to display url in UIWebView but I can not display, webview just call the fail with error method. My url is this "http://www.tekniknoktamarket.com/index.php?route=feed/google_base",
So please help me how to display this url in UIWebView *?*
In order to have a UIWebView download and display the content from a URL, you need to go through a couple of layers of abstraction, the first being an instance of NSURL, which contains your URL string. Then, you hand the NSURL to an instance of NSURLRequest. Finally, you hand the NSURLRequest to the webView. It all looks something like this:
NSURL *url = [NSURL URLWithString:#"www.your-url.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[yourWebView loadRequest:request];
That should do it.
This is the code loading a URL into a webview:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:#"http://www.theurl.com"]]];
If you're using this code and are encountering any problems, please provide the code you were using and the exact error

how to pass value through NSURL

i was trying to pass value to a native html page from my web view application
I try
url=[NSString stringWithFormat:#"%#?bob=123&frank=321&tom=213",url];
but when i build and debugging program, application crashes showing “EXC_BAD_ACCESS”
Please help me if anyone knows how to do this.
The UIWebView class only supports loading of URLs using the NSURLRequest class. To do what you want to do, you'll need this:
NSURL *url = [NSURL URLWithString: [NSString stringWithFormat:#"%#?bob=123&frank=321&tom=213", base]];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
[webView loadRequest:req];

Why UIWebView Eating so many Memory?

I'm using a UIWebView to load a pure Text HTML page for my iPad app. The size of the HTMP page is only 40KB. But when I use the instrument to monitor the memory use for loading the UIWebView, I found down it consumes like 20MB memory, if I scroll the web view, the memory is even getting higher. Finally I get a level 1 memory warning.
Could anyone help me with this? How could I reduce the memory for this? (I need to use the HTML to show the text here).
NSString *htmlPath = [[NSBundle mainBundle] pathForResource:#"index" ofType:#"html" inDirectory:#"SPC"];
NSURL *url = [NSURL fileURLWithPath:htmlPath];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
htmlPath
url
request
release all of them after this line
[webView loadRequest:request];
then release webview in dealloc and use webview as ivar