Text

After entered the background

This article is all about the UIApplication class.

The world has changed after Apple added multitasking feature to iOS4. Before that day, I used to save my data using the notification UIApplicationWillTerminateNotification, this means when the user presses the Home button to close the application, the notification will pull the trigger, and your application can do anything you want it to do during the terminating process. Before the day multitasking come, we are safe with this idea.

But after we have the multitasking feature goes with our beloved iOS4, a new deal has been signed. When the user presses the Home button, the application will be running on the “background”, and waiting for our user to use it again. That means the application will not be terminated. That means the notification UIApplicationWillTerminateNotification might not be fired. Not even when we kill the application process while entering the list of “background“‘s application. I have tried, I am not sure if I right or not but my application couldn’t do the same thing like it used to. In my opinion, UIApplicationWillTerminateNotification isn’t the right notification for my application more, I have to find its replacement.

And thanks God, I found the UIApplicationDidEnterBackgroundNotification notification. For now, after the application entered the “background”, the notification will pull the trigger, and our awaiting actions will be fired. Cool hah?

P/S: I am not implement the comment function, so if you have feedback or any suggestion, please reblog or send me an email to nguyen at ducban dot com. Please note that I am a newbie of iPhone Developer World and I need your help.

Photo
Love the way we are together in my newest (Twitter/Dribbble) avatar. Love you, son!

Love the way we are together in my newest (Twitter/Dribbble) avatar. Love you, son!

Text

I am Dribbbliiing

I have just received a Dribbble’s invitation from @mintran. Awesome! I have been waiting for a long long time for this invitation. I might not born with the gift like Min, who is the best Vietnamese designer that I ever met, but I love design a lot. Dribbble is a play ground where high class designers from around the world are sharing their works and discussing about them. Now I have chance to get closer to them.

I wish I can make some good designs to share here.

Text

The approval

This blog is wrote to announce you that my iPhone Developer Program registration has been approved three days ago. You can say “Yeah, congratulation!”, or “Ooops, why was it too late?”. Whatever you going to say would be good. All I want is the approval and I had it already.

It’s time to test my apps. Yay!

Photo

I love this picture, and its topic too.

Link

Non-hover on a "touchy" thing

There was a question from a friend before the release of iPad: This “touchy” thing maybe good, but what do we have to replace the non-hover problem. Frankly, I couldn’t find anyway out for this question.

This article is giving us a solution, try on. In my opinion, it still has some cons. But it’s a good experience to follow because you will any find any better than that.

Text

Fingers crossed

Yesterday, I registered to Apple’s iPhone Developer Program to have the permission of testing and running my application on my devices. My friend told me that my approval might be listed to the blacklist due to the fact I am a Vietnamese. Someone named Thuat Nguyen has hacked iTunes and made dirty money using this black hole. That’s why my friend said my registration can be rejected by Apple.

I am now having my fingers crossed praying that the incoming email from Apple is an approval, not a rejection. I didn’t expect that my first note about iPhone development will be like this note, but life is cruel, isn’t it? Only God knows what will happen tomorrow.

Link

CSS min-height hack for IE6

In my opinion, this hack is acceptable and unobstructed. IE6 is out there, you should know this trick before you walk out the door and face it.

Text

return false vs preventDefault

“Steal” it from a comment of this article.

If there is javacsript error in page, using return false browser will perform default action. That can be avoid using preventDefault(). Example:

$('a').click( function(e){
   $(this).css("background", "green");
   err();  // err is not defined, so javascript will throw error, and browser will ignore rest of the code (return false). Browser will perform default action.
   return false;
});
$('a').click( function(e){
   e.preventDefault();
   $(this).css("background", "green");
   err();  // err is not defined, so javascript will throw error, and browser will ignore rest of the code. We already called preventDefault() so browser will not perform default action.
});
Photo

Dear son,

It been 10 months from the day you came. You did a great job to be my beautiful son. Keep growing and keep being cute like that.

Daddy love you more than anything in the world.

With kisses,
Your dad.