AuthorAl
Lost but trying
Profile
Posts: 23
Reg: Dec 31, 2013
Glasgow
3,780
02/21/14 04:08 AM (10 years ago)

Catching a code...

Okay...I'm a week or so in - and have spent a lot of that time staring at the app slowly appearing. I am adding plain text to the Custom HTML/Text Plug in and realising - when I look at the code - that the text's font colour/size/type etc is depicted for every paragraph. My instinct tells me that I could set the type and size and colour of font at the top of the Source Code for each screen... but I have no idea how to do this. I obviously want text to not be too big on an iPhone 4 and too small on an iPad. So I have some embarrassingly simple questions. A) Is it better to set the text size & font with Headers i.e. H1/H2 etc instead of filling the info in via the >click on boxes. B) If so - is there anywhere I can get some sample code to look at/adapt? (As I have no clue, apart from some very very basic coding I did tweaking an ebook template) Is there a buzztouch template for common essential source code chunks? ( I suspect not) C) Further to this, is there an example anywhere of a coded app - before it is compiled by Xcode - so I can see what source code looks like for all the elements of an html heavy, text based app? i.e. splash screen, main menu, submenus etc... I am better deconstructing something than putting stuff together and not really knowing how it should look. I was looking for a beginners section where I might find some of these answers, rather than bothering experienced developers. Any thoughts? Al
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/21/14 06:04 AM (10 years ago)
There's a lot of hoopla about CSS, and granted, for some really cool stuff it's the way to go. CSS stands for 'Cascading Style Sheets' and it's a fancy way of saying 'Style Template' for elements of your page. You can include it 'in' the page, or keep it in it's own file and 'reference' it from within the page; it's up to you. But I've always been a big proponent of 'whatever works best for your skill level'. So if you need to get something 'out the door', then by all means <H3><I>go for it</I></H3> but CSS 3 and HTML 5 is pretty neat stuff, and worth looking at. I used to be a whiz at HTML. This was well before CSS came around. I was a 'table master', lol! But now there is far too much to keep up with, so I try to learn enough to wade around a bit, but not enough to swim. Most of the time I'm borrowing the achievements of others, with respect to HTML5 and CSS… "I" think the best 'sample' code is just a simple buzztouch project that you build and download. Take a look at the 'Buzztouch University' videos, or some of the many on YouTube (search keyword:Buzztouch) and you'll find all kinds of contributed videos of how things work. Once you've put a project together on the web (nothing too fancy to begin with) download the project in either iOS (Mac) or Android (Mac or PC) and snoop around the code. Be sure to look at the 'blank plugin' for a 'clean slate' view of the absolute minimum required items. And a few of the other plugins give great examples of other types of user interfaces and the underlying code. You can compile and run on either a simulator or actual device (well, on iOS to run on an actual device you'll need a developer account, but the simulator works dandy in the interim) and you can watch the 'log files' telling you what's going on, while the app runs… Either way, don't hesitate to try something. It's not like you'll break it. And if you do, who cares? Trash the old copy, unzip a new copy, and try it again! :) And if you have questions, the forum is a good place to look for answers, and new friends doing the same thing. Also check out the 'How To' section; it's a gold mine of tutorials and resources. Cheers! -- Smug
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
02/21/14 07:27 AM (10 years ago)
Good advice by Dr Smug, as always! Now, just an embarrassingly simple answer if you wish to use HTML: don't use the Custom HTML/Text plugin, use 'real' HTML files! Have a look at this, it may help: http://www.fusions.ch/iphone-apps/tricks/redirect.zip Cheers Jack
 
AuthorAl
Lost but trying
Profile
Posts: 23
Reg: Dec 31, 2013
Glasgow
3,780
like
02/22/14 08:21 AM (10 years ago)
Excellent advice - many thanks from you both Al
 

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.