Discussion Forums  >  WebViews and HTML for Mobile

Replies: 9    Views: 132

MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
04/18/12 10:17 AM (13 years ago)

Costum HTML/TEXT

Hi, trying to understand how this works. I'm using a costum html/text to display and image and a text I copy/pasted from word. I have a menu with some buttons that lead to different costum html/text pages. Copy/paste from word ends up not working (as say the warning) what happened is that the text is copied alright the image always came back the same in all pages, being the image shown the last I copied. So decided to do this editing the html source and redirecting the image to its location instead of a temp file from the copy/paste. Now my question is, when submitting to apple, I assume all is uploaded from my mac including the pics, and (sorry for being so ignorant about this) and people use the app the pics will load normaly, or will the app try to open the pic following the link in my mac? Thanks
 
Dkeller
Aspiring developer
Profile
Posts: 153
Reg: Aug 18, 2011
Saint Augustine
3,680
like
04/18/12 10:39 AM (13 years ago)
As long as the image is in the BT_images folder within the project in xcode, and you have correctly referenced them, the images will load correctly. The images will be read from the app itself and not from your Mac. It is best to test your app on an actual device to make sure all is well! Hope this answers your question! -DKeller
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
04/18/12 10:50 AM (13 years ago)
Thanks for your reply. The images are on the BT_images folder. Where do I have to reference them? Thanks.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/18/12 11:08 AM (13 years ago)
Hi @MadRod, I would advice against ever copy/pasting text from Word. That tends to bring over weird formatting issue, which almost always breaks things. Better to copy and paste from a simple text editor like Notepad. There are no formatting codes with that editor. If you have images in BT_images, to reference them in your local HTML file, all you need to do is an <img src="imagename.jpg"> and iOS will find it! No need to reference a folder or anything. In fact, you can have subfolders within BT_Images, and still just reference the image name. Remember...no spaces or weird characters in the image name. Mark
 
Marko
buzztouch Evangelist
Profile
Posts: 558
Reg: May 04, 2011
UK, Alcester
8,880
like
04/18/12 11:34 AM (13 years ago)
My advice on this is either to use BT Own HTML editor or use a dedicated HTML programme and copy over HTML via the source. Marks advice Is golden here especially his document on files and on how they should be in correct folders
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
04/18/12 11:37 AM (13 years ago)
Thanks guys.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/18/12 01:03 PM (13 years ago)
Just in case any Android people stumble here , In Android HTML images go in the assets > BT_Docs folder FRED
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/18/12 02:10 PM (13 years ago)
And subfolders have to be included in the path. These iOS guys have got it Sooooo easy!
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
04/19/12 12:20 PM (13 years ago)
Got it, thanks.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
04/26/12 06:01 PM (13 years ago)
I understood what I was doing wrong, when after copy/paste I looked at the source and found the the temp file was always the same, thus the image came the same. I changed the source to the image and point it to my folder, and in the IOS simulator, everything came out ok. Thanks.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.