Discussion Forums  >  WebViews and HTML for Mobile

Replies: 24    Views: 155

Chris from Stafford
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
10/19/13 08:45 AM (10 years ago)

Custom Html

Set up a page with Custom HTML and it wont show in the ios Simulator Also how do I add an image from my image folder? I have set up menus ok and they work - now I want to add some content If I add html that looks good on an iphone will it upscale for an ipad or is there extra code needed for that. I'm a complete novice so please explain in laymans terms Thanks in anticipation
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 09:56 AM (10 years ago)
I think I know why - do I have to download the project and just drag the missing plugins over & then delete the downloaded project?
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 10:18 AM (10 years ago)
If you already have a copy of the code downloaded, then probably, yes. Anytime you add a screen with a new plugin, you'll need to download the code and replace the bt_plugins folder in your working directory with the newly downloaded one (or just launch the project from the newly downloaded folder), and drag the 5 folders mentioned in the included instructions into the xcode project.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 10:21 AM (10 years ago)
Thanks Have done that and I can see the html effects on the simulator now How to I add images simply ? I want to add a couple of buttons under my text on the page
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 10:27 AM (10 years ago)
If using the custom html plugin, and you're looking to add buttons/images in that html page, you'd have to add the html code for a button... something like: <a href="http://www.whatever.com/MyPage.html"><img src="MyButtonName.png"></a> This would be entered after clicking the "source" button in the upper left corner of the box where you enter your html/text There is also the paid HTML Pro addon that will allow you to generate an html link to another screen in your app, instead of directing your button to another html file or web page. Don't forget in Xcode to go to File>Add files to project and add the image for the buttons you entered in the html code (in the above example, you'd have to add "MyButtonName.png" to the files in xcode, as well as any local html files that you are loading, if they are not pointing to a remote page on the web)
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 10:36 AM (10 years ago)
Simple as that! I have the html add-on ready to go also! So will let you know in a little while how i've done with it Thanks again
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 10:47 AM (10 years ago)
It wont work when I add the image reference and save it saves as this so the image doesnt appear - very odd <img src="map.png" /> I've tried it over and over and get the same result I think my custom html plug-in doesnt work :(
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 11:07 AM (10 years ago)
Correction it does with a url - so I must have the wrong reference to image I presume I just put it in the BT_images folder - I guess that's not right
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 11:20 AM (10 years ago)
Yes, that is the correct format... the HTML code editor in the plugin will reformat your code a bit, and the <img src="map.png" /> that you are seeing is the correct way it reformats. After adding the image to the bt_images folder, are you adding the map.png file to the xcode project by going to file>add files to project?
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 11:45 AM (10 years ago)
The image wont even appear in the html window let alone in the simulator Also the Advanced html link gives a not found on this server error Very frustrated, I've rebuilt the project and started again and still no joy
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 11:52 AM (10 years ago)
If using a local file (not a URL for the image), it's won't appear in the html window, since it doesn't know where the image is until the code is compiled in xcode. If the image has been added to the xcode project, it will find and display it, even though you won't see it in the buzztouch html window (because we add the image to the project in xcode, after the code has been downloaded). For the HTML Pro plugin, if the generated code (long string of numbers) to use for the URL of the screen isn't working, try a clean in xcode then rebuild. I had that happen a few times. Once I couldn't get it to work, deleted the item from the advanced html pro plugin, and readded it, giving me a different code, and it worked that time. It can be frustrating at times, but sounds like it's just something simple that we are overlooking... I'm thinking if you download the code and run in the simulator, your map.png image should show, assuming you have added the file to the xcode project, since everything else looks right.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 11:54 AM (10 years ago)
Ok forgive my ignorance, but it's all new to me Where can I find the clean button in Xcode?
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 11:59 AM (10 years ago)
Ok just found it That's got my images working! Now to reset the links ....
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 12:00 PM (10 years ago)
Awesome, glad it's working. Hopefully the links work too :)
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 12:08 PM (10 years ago)
No links dont work Re done too & still dont work Must be something missing
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 12:27 PM (10 years ago)
No doesnt work at all Tried everything - very disappointed as I paid for this plug-in and it just does not work Put me off buying anymore plug-ins
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 12:31 PM (10 years ago)
Here is how the HTML should look (copied right out of my working code)... obviously change the string of numbers and letters to the one it gives you in the control panel... <a href="AE93F5B367BA5632D2C6BF1"><img src="but_menu.png"></a> Don't get discouraged with the plugins... sometimes they just take some playing with to figure out how they work. I've purchased over half of the available plugins, and am happy with every one of them. Some of them didn't seem to work right at first, until I figured out how they were meant to be implemented. Worst case, the author of the plugin will get it working for you if you send them a PM or an email... all of the plugin publishers are really really good about that.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 12:34 PM (10 years ago)
Oh, and if you haven't already, you'll need to redownload your code if this is the first time running it with the new HTML Pro plugin, and re-drag those 5 folders into xcode, otherwise Xcode won't know what to do with the HTML Pro link in your code... that might be the problem.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 01:27 PM (10 years ago)
Yes I've done that also But I've found that the plug-in wont ignore the address & phone number formatting even though I've asked it to I guess it's broken
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 02:14 PM (10 years ago)
Completely baffled Gone through the pdf & the youtube video and it just doesnt work Found the way to remove address & number links but cant get the link to screens working with html pro
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 02:14 PM (10 years ago)
There are a few things not working with the new iOS7, which will be addressed when the new iOS BuzzTouch 3.0 core comes out (rumored to only be a few days away). It's not the plugin, it's the way apple changed things, but as always, BuzzTouch adapts and fixes it. You can ignore that issue for now, as it will probably fix itself in a couple of days when they release the new 3.0 core.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 02:16 PM (10 years ago)
For the links not working, try giving the plugin author a PM or email. Mine works fine, so it's nothing with the plugin or the 3.0 issues Also, make sure you publish your changes, and do another clean in xcode. Couldn't hurt.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 02:17 PM (10 years ago)
Thanks for the help I've messaged the author so I'm sure he will know what I've done wrong
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
10/19/13 02:36 PM (10 years ago)
Doh! Found the problem , so simple feel a bit of an idiot I set my menu link to the custom html file instead of the html pro link So it works like a dream now and does just what I want! Another problem solved and understood , on to the next Thanks again!
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
10/19/13 03:41 PM (10 years ago)
Awesome, glad everything is working. The plugins are always pretty solid... It's just just something little like that when things don't work as expected. :)
 

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.