dissabte, d’agost 25, 2012

Showing static content in a iPhone/iPad app

I'm writing an application which shows some static text in one of its parts. The text is descriptive and quite long and with format, with different sections, emphasized stuff, underlined stuff, and so on, so a UIWebView is best suited for this (a UITextView applies its formatting to the whole of the text it shows).
Initially I thought I would be taking advantage of the fact that UIWebView can also show Word files or PDFs. But neither was usable, for some reason or other the PDF could not be pinched for zooming and was too small to be read. The Word could be pinched but panning to the right to read each line is not that usable.
I decided therefore to use HTML for the web view and found the plentiful information about HTML for iOS Safari available in the Apple documentation. Though the doc just doesn't suggest any application to create that HTML.  HTML has been around for so long... yet a suggestion would have been useful.
First I looked at iWeb, which is a cool program to create a website but not really suited for what I needed. Besides, it has been discontinued.
After googling around, I settled for Komodo Edit, which is free and is quite lightweight yet helpful. But my HTML had accented characters and it does not support them out of the box so I had to replace all "é" with "ampersand e acute" and the same for all other accented characters, which is not cool.
At least now the text flows nicely and is scrollable.