Archive for November, 2008

*How Tos* in iPhone App Development (baby steps) – updated

I’m just starting to learn how to write objective-c for iPhone application. Objective-c is very new to me, but I’ve known java and c# pretty well. So most of posts that I’m going to upload on iPhone app will be notes to myself, so I won’t forget and use it as references later.

#1 reference – how to instantiate an object!
In objective-c, “alloc” is used instead of “new”. Here’s a simple text on how to create an object. (assuming we are not using singleton’ized class)

1
2
UIColor mycolor = [[UIColor alloc]
                          initWithRed:0.32f green:0.37f blue:0.84f alpha:1.0f];

I was so confused with the objective-c grammar when I first started learning objective-c. As I looked at the grammar more and more, it became much more clear now luckily.

Updated: Nov 23, 2008

Programming flow for the iPhone application is like this:

  1. calls main method
  2. in main, calls “UIApplicationMain” with applicationDelegate class as a parameter along with other parameters
  3. applicationDelegate creates UIWindow and root level UIViewController

Those three steps are pretty much mandated in order to launch something in your iPhone app for the sake of MVC design pattern.

Text Layout Framework

http://labs.adobe.com/technologies/textlayout/

Text Layout Framework

Text Layout Framework

Text Layout Framework has just been released and available to testout at Adobe Lab.
The sample in the page shows what flash player 10 can do with text and it’s quite amazing work that Adobe did. Prior to flash player 10, managing text in flash content had been quite work and literally there was not fine defining tool. These days I got more interested in flash after flash player 10 was released.

What languages does the Text Layout Framework support?
The Text Layout Framework supports over 30 writing scripts, including: Latin (English, Spanish, French, German, Vietnamese etc.), Greek, Cyrillic, Armenian, Georgian, Ethiopic, Tifinagh, Yi, Cherokee, Canadian Syllabics, Deseret, Shavian, Vai, Tagalog, Hanunoo, Buhid, Tagbanwa, Hebrew, Arabic, Thai, Lao, Khmer, Han ideographs and Kana (Chinese, Japanese, Korean), Hangul Johab (Korean), Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Thaana, and Tibetan.

That’s supported language. However, I am not quite sure how well the framework would work with 2bytes language such as Korean or Japanese language. As those language font files are hugh. I mean really *huge*. That’s something that has been a big issue in those countries with the flash player and has not been a really good solution as far as I understand. (Please correct me if I’m wrong.)

Other than that, Text Layout Framework(TLF) looks really really good! :)

iPhone SDK

I just finished downloading iPhone SDK. The file size for the compressed package is whoopy 1.41GB. With my 6mbps cable internet line, it took about 30 mins. While installing, the installer was hanging with a message of “Install time remaining: About 4 minute”. I thought the installer may have crashed. It turned out that the installed waited for me to quit iTune application. :P

I’ve had the old SDK on my MacBook Pro for a while already. However I neglected to keep it updated so my SDK got out of date. Also today I ordered the “iPhone Developer Program”. (I am still waiting for a confirmation email from apple though…)

I can’t wait to see a confirmation email from apple for the program.

syntax highlight test

1
2
3
function alertme() {
    alert("hello highlighter! :)");
}