Three20 Network Programming ( 1 )

An easy to follow tutorial goes through all the details about how to do networking programming for your iOS/iPhone project, by leveraging the power of the Three20 framework.

Three20 Learning Notes – URL Based Navigation

Recently I started a new iPhone project, which is an utility application. Not game anymore. To speed up my development process, I decided to use Three20 library for most of the UI development.
Three20 is an open source iOS library, contributed by Joe Hewitt, the developer of original Facebook iPhone app. It is a big package, with very rich functionalities. Many familiar UI elements you see from the facebook app can be found here: the Laucher View (the startup screen with icons for different functionalities), photo album, … Some UIKit classes are also enhanced, which makes them easier to use (once you have learned it), and also more powerful.
However, everything comes with a cost. And three20 is not perfect either. The most complained issues are the complexity of this framework, not-well-managed dependencies, and lack of documentation. There are some basic information on its official website —, but far …

My Favorite Blogs

Hi! It’s time for #iDevBlogADay again! Today I want to have a light post, talking about what technical blogs (specifically for iOS development) I follow, and my opinions on them.

Posting Freq: High
Pros: This is by far my favorite iOS tutorial blog site. Ray and his co-bloggers did a wonderful job in all aspects, from explaining simple concepts to showing you how to make a fully functional complex games. Everything is made crystal clear. I specially like their style of “tutorial series”: which covers a big topic in several posts. Currently the topic is “iOS 5 Storyboard”.
Cons: My only wish for them is to cover more UIKit stuff. After all, not everybody is using cocos2d for his/her project.


Posting Freq: High
Pros: I discovered his blog when I started learning In App Purchase. And then has been following him. His posts covers many different areas and with a lot of attention …

Generate Particles Along A Path

Particle is a big topic in iOS animation. To create realistic smoke, fire or even rain drops or snow falls, having a good particle emitter is the key. But in this blog, I am going to talk about something more than a basic particle emitter.
In most of the cases, particle emitter generates particles randomly — random color, random size, random direction — with the control of some key parameters. But it is not always like that. Sometimes we want the generated particles to follow a certain path, such as water trace, a group of firefly, or sparkles in the wind. That’s what I am going to talk about this time — how to generate random particles along a path. Before we start, let’s take a look at the end result first.

As you can see in the demo, at first the particles ran around the character “2″; then in the second …

iOS vs. Android — Mobile Dev Platform Heads Up

We released the first version of “Penguin Links” game on Android Market (called “Pair Up” there) on March 2009. And then the iPhone version on June 2010. In the past two and half years, we had released many upgrades; and our games had their own up and downs. Being on both development platforms for a long time, I think it will be interesting to compare these two mobile platforms head-to-head. And here it is.

1. Development Environment
Before I started iOS programming, I was a long time Java programmer. I was used to some awesome programming IDEs such as IntelliJ IDEA, Eclipse, or NetBeans. My personal favorite is IntelliJ. I like it not only because it has a rich feature set, but also the consideration they have put in for those features. The seamless integration with maven/ant, color coded file names, highlighted changed lines, quick and easy refactoring … Nowadays, number of …

Implement “Focus Area” Special Effect in iPhone Apps

Nowadays, the competition in Apple App Store is so strong that it takes almost a perfect product and some luck to be successful there. You can’t control luck, then you got to make your product close to perfect. For games, that means not only fantastic game play and graphics, but also a lot of tiny details here and there. In my recent game “PenguinLinks 2″, I implemented a special effect in the level choosing screen, which I call “Focus Area”, to enhance the user experience. I don’t know how many users it has gained for me, but I certainly had a lot fun when I implemented it. That’s the topic we gonna cover in this post.
A picture is worth a thousand words. Then a video must be worth more than a million. Now let the video to explain what the effect look like.

As you can see, in my level choosing screen, …

Revamp of a game

This is the second post for #iDevBlogADay.
Bejewled is a very popular game on phones. It has a lot of variaties, one of the famous game on Android is called “Jewellust”, which is an Egyptian treasure hunt theme of this game. I developed a similar one on Android 2 years ago called “Same 2D“, which is essentially a timer based Bejewled. Despite praises from players saying it’s very addictive, this game didn’t fly.
What didn’t go well?
Going through player comments, I got 2 points for improvements: limited game levels, and too simple graphics.
First about graphics. Graphics/Animation is the key to games, and I admit that my photoshop skill is very limited. So this time I went out and hired a graphics designer. Theme is the first thing we need to decide on. As I said earlier, there’s a lot of Bejewled variaties out there, and we need to come …

Making Better Decisions Based On Tracking Data

After a long wait, finally it’s my time to contribute to #iDevBlogADay!
Today I won’t talk about anything too technical. Instead, I’ll talk about how to make better decisions based on data in my iphone app development experience. Be more specific, how to leverage the power of Google Analytics.
There are plenty of tutorials online about how to do the integration, such as Google’s own doc, or this one from icode blog, so I don’t want to repeat that. My focus will be what data I track, what I have learned from that, and how these data have impacted my decisions.
1. A Little Bit Background

In June 2010, I released my two iphone games “Penguin Links“, lite and full version (the latest version is available in app store at: After that, I had two updates followed in August and October.
In US, they are not …

How to permanently move view with animation effect in Android

One of the task I was trying to achieve is moving a view from (0, 0) to (x, y) permanently with animation effect. Using TranslateAnimation is not good enough because it only draws the view in new location, but its actual position (invoked by getLayoutParams) is still in (0, 0). I tried attaching an AnimationListener and at the end of the animation and calling “view.setLayoutPararams” to (x, y), but it caused the view to quickly flash from (0, 0) to (x, y) at the end of the animation.
Finally I got this simple solution:


// first set the view’s location to the end position
view.setLayoutParams(…); // set to (x, y)
// then animate the view translating from (0, 0)
TranslationAnimation ta = new TranslateAnimation(-x, -y, 0, 0);

Pair Up Bug Fixed

Thanks to our enthusiastic players: the bug during board shuffling is now fixed. Please download the latest Pair Up (free version 5.2, pro version 5.3) and give it a try!
Let us know if you have any feedback: write to us or follow us on twitter: @clingmarks.