Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 07-06-2011, 12:56 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 6
thomasnat1 is on a distinguished road
Arrow UIWebView manipulation

I am developing an iphone app that displays web content on the iphone by way of webView. For each of the sites being displayed I need to hide something at the top and something at the bottom of the web view. Is there a way I can manipulate the content of the webview to only display the portions I want shown.

Thanks in advance.
thomasnat1 is offline   Reply With Quote
Old 07-06-2011, 02:24 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

the approach to manipulate the html code from your client is not the best, what I would consider is to make a php script that load the page and give in output the right portion....something server side....


However an approach is to use NSURLConnection or ASIHTTPRequest to download the page and then edit the stringResponse and then loading the result code with
Code:
[yourWebView loadHTMLString:htmlEdited baseURL:originalUrl];
but if you need to use cookies, get\post or any other advanced thing, can be hard to use this approach.
__________________
dany_dev is offline   Reply With Quote
Old 07-06-2011, 08:14 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 139
dudeofswim is on a distinguished road
Default

^+1. PHP would work best here. Don't mess with the webview.
dudeofswim is offline   Reply With Quote
Reply

Bookmarks

Tags
constrain, manipulate, view, web, webview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 385
18 members and 367 guests
Absentia, AyClass, Diligent, dre, givensur, hussain1982, jbro, jPuzzle, momolgtm, Newbie123, Paul10, revg, sacha1996, skog, skrew88, taylor202, tomtom100
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,643
Threads: 94,110
Posts: 402,858
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Diligent
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:44 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0