Search code examples
iphoneuiwebviewmobile-safari

how do i tell a website that it's a UIwebview so it can use css to redraw view


I have a UIwebview that I want to go to Amazon.com, when I load amazon.com it doesn't have the same format as if I went there from iphone safari. What tell a website like amamzon to redraw for iphone? Here's my Code:

 - (void)viewDidLoad {

NSString *urlAddress = @"http://www.amazon.com/Inventive-Gadgets-Inc-PQFan-Professionally/dp/B000V8ASR6";

//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];

//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//Load the request in the UIWebView.
[webView loadRequest:requestObj];
 }

- (IBAction) gotofourth{
[self dismissModalViewControllerAnimated:YES];
}

Any help would be great.

Thanks


Solution

  • You're going to want to change your user-agent; here's an existing question that might help: Change User Agent in UIWebView (iPhone SDK)