Discussion Forums  >  Images, Documents, File Locations

Replies: 11    Views: 188

hannekemeier
Apple Fan
Profile
Posts: 40
Reg: Mar 11, 2013
Eersel
400
03/14/13 05:27 AM (12 years ago)

Add image in HTML for iOS

Hi! I'm a newbie here and been searching the forums, but can't seem to figure out how to add an image in custom HTML. What should the code be? I tried <img src="image.png" /> and <img src="BT_Docs/image.png" /> but that doesn't work.. Regards, Hanneke
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/14/13 06:11 AM (12 years ago)
Hi @hannekemeler, Welcome to Buzztouch! <img src="image.png" /> should work. Just make sure that your image is also in your BT_Docs folder in your project. Good luck, Farcat
 
hannekemeier
Apple Fan
Profile
Posts: 40
Reg: Mar 11, 2013
Eersel
400
like
03/14/13 06:25 AM (12 years ago)
Thanks for your reply Farcat! Unfortunately it's not working. I checked again, I have the right code and the image is in the BT_Docs folder. Downloaded the source-code again and put it in Xcode. It's not there.. I just can't seem to figure out what I'm missing.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/14/13 06:30 AM (12 years ago)
Don't worry, we'll figure it out. Is the app running at all? Can you see the html document?
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/14/13 06:32 AM (12 years ago)
Hi @hannekemeier, Make sure you drag everything over in your Xcode project and build. LA
 
hannekemeier
Apple Fan
Profile
Posts: 40
Reg: Mar 11, 2013
Eersel
400
like
03/14/13 06:34 AM (12 years ago)
Yes, the app is running and the html-document is showing. Backgroundcolor, text, font etc. is just the way it's supposed to be. But no image. Hi LA, thanks for your reply! The images are in the project and I refreshed the Ios-simulator. Is that what you mean?
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/14/13 06:36 AM (12 years ago)
Hi @hannekemeier, I'm not an expert on Xcode, so @farcat can assist you better, but I believe you click build each time. LA
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/14/13 06:41 AM (12 years ago)
Yes, that is it. Every time you add a document to Xcode you need to rebuild. :)
 
hannekemeier
Apple Fan
Profile
Posts: 40
Reg: Mar 11, 2013
Eersel
400
like
03/14/13 06:42 AM (12 years ago)
Yes, that's it!! So easy, haha. Thanks so much!
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/14/13 06:45 AM (12 years ago)
Easy when you know it. :) I remember somebody had to point it at to me too. Well spotted LA. Good luck with your app. Farcat
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/14/13 06:47 AM (12 years ago)
Awesome @hannekemeier and @farcat! LA
 
hannekemeier
Apple Fan
Profile
Posts: 40
Reg: Mar 11, 2013
Eersel
400
like
03/14/13 06:53 AM (12 years ago)
Learning every day :) Thanks, I think it will work out great :D By rebuiling it, I discovered other issues are solved now too. I'm happy :D
 

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.