Hide elements in UIWebView?

Joined
Aug 28, 2014
Messages
2
Reaction score
0
Points
1
Hello. I'm new to coding and I'm learning as I go along.

I have set up a UIWebView that links to a site (not owned by me). What I would like to do is load only part of the site. Can this be done? If I look at the website source I can see the ID's of the sections I would like to load. Is this enough to accomplish what I want to do?

If this is possible would it mess up the formatting of the site? Would I be left with "empty" spaces where objects would normally be?

Maybe I could accomplish this by using iframes or an equivalent?

Any help is appreciated,
Chris.
 
Joined
Feb 25, 2009
Messages
2,112
Reaction score
71
Points
48
Your Mac's Specs
Late 2013 rMBP, i7, 750m gpu, OSX versions 10.9.3, 10.10
You could always take the option of using a NSURLSession, downloading the web content, parse it to just include the block on content you want, add appropriate HTML tags and CSS formatting information required and feed that to your UIWebView.

Just be careful on "borrowing" data from a third party site if you plan on distributing the app - many sites don't take kindly to someone hijacking their data :)
 
OP
C
Joined
Aug 28, 2014
Messages
2
Reaction score
0
Points
1
You could always take the option of using a NSURLSession, downloading the web content, parse it to just include the block on content you want, add appropriate HTML tags and CSS formatting information required and feed that to your UIWebView.

Just be careful on "borrowing" data from a third party site if you plan on distributing the app - many sites don't take kindly to someone hijacking their data :)

Thanks for the reply!

I will look into NSURLSessions and figure out how they work.

Yes I understand the owners of some sites might not like this, but the site I'm borrowing from is badly optimised for iOS. I'm just trying to make it more user friendly :)

I dont have a developer account so it will only be available (free of charge) to the Jailbreak community.

Cheers.
Chris.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top