I'm trying to create an small app for a wordpress blog. For doing this i figured that i would make a webservice
which convert the post_title and post_content of the mysql table to an json
object and then use AFNetworking
for the requests.
The problem is that the post_content is an html string like:
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
<a href="http://URL/wordpress/wp-content/uploads/2014/04/Digital-Board-2.png"><img class="alignnone size-full wp-image-5" src="http://URL/wordpress/wp-content/uploads/2014/04/Digital-Board-2.png" alt="Digital Board 2" width="1024" height="704" /></a>
I've tried by putting this into an UIWebView
, but this does not fit probably since pictures is way bigger than the screen.
I'm wondering what are the right way to do this, so i can customize text and images correctly.
I'm thinking wether you can put all of it into an array and then split by url or something. So it would look something like this:
Array = [Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!], [http://URL/wordpress/wp-content/uploads/2014/04/Digital-Board-2.png]
Is this possible? and if yes how can i do this?
I'm open for better ways.