views:

21

answers:

1

i am trying to display an image from a url into my UIWebview but the image size is too small to be displayed without making it blurred by stretching it..Since i cannot auto-resize the image(as it gets blurred) i was thinking of getting and setting user-agent value for iphone...But i m not able to find much relevant info about it and i am also not sure if it'll work or not?? anybody having any idea how it can be accomplished??

A: 

If you implement a UIWebViewDelegate class, you can fetch the Request with webView:shouldStartLoadWithRequest:navigationType: – at this point you should be able to manipulate the Request, something like

[request setValue:@"your custom useragent" forHTTPHeaderField:@"User-Agent"];
unset
orHTTPHeaderField:@"User-agent" worked
hemant