Help Needed in web view
HI All,
I am using web view to open a web page in my iphone app, its woking well, and able to connect to the mentioned web page, but in the web page v开发者_开发技巧iew it shows crossed images instead of the actual images there, and look is also not so good, is there any way to rectify this.
With Thanks iPhoneDeveloper11
Yes, there's many ways to improve the view of your web page. This is basically how I'm doing this:
- First you need to download the webpage. I use ASIHTTPRequest for this purpose.
Analyze the response you receive. Print a string from the response:
NSString * response = [request responseString];
NSLog(@"HTML code: %@", response);
Scan and replace the html code by use of NSScanner. Example code:
- Parsing CSV Data
- Writing a parser using NSScanner
The crossed image could be an image tag which does not contain a valid url. You can use NSScanner to find the image tag and correct the url, or if you want to you can resize or align the image. Learn about simple image tags on this link: Simple Image HTML Tags.
精彩评论