by Aaron Brethorst | April 16, 2013
Cocoa Controls: Who are you? What do you do?
Hon Cheng: I’m Hon Cheng, an iOS developer based in Singapore. I enjoy both design and coding, and especially love creating custom UIs. I got started with open-source projects like PaperFold to share that passion.
I co-founded buUuk, a mobile application development company in Singapore. We’re relatively young with 18 employees at the moment. We cover everything from front-end mobile clients to back-end server services. We make apps for iOS, Android and a little bit of Blackberry.
Most recently, I started a new company with my good friend Junjie. He made the popular Dueapp. We’ll have our first app out soon.
CC: What’s on your iPhone’s home screen?
HC: I use Safari, Reeder and Due a lot. I have a folder in the dock to fit more apps in the first page. I keep a lot of apps, so I just use spotlight to find apps most of of the time.
CC: How, why, and when did you become an iOS developer?
HC: I started iOS development in early 2008. While doing my Masters in Biology, I had some free time to play with my new iPhone. There was no App Store and no official iOS SDK then, so most coding had to be done with a basic text editor, and apps could only be deployed to jailbroken phones.
My very first iPhone app was a transport guide. I spend a lot of time commuting daily, so this app was designed to solve a problem close to heart. I didn’t have much of a programming background at that time, so the app took me a very tough 3 months even though it was just a fancy plist reader.
I learnt a lot from building that very first app, and fell in love with app creation. I like that I can turn ideas into products, and that allows me to love what I do every day.
My most popular apps are still SG NextBus and SG Buses, based on that first app I made. They have seen over 2M downloads in Singapore.
CC: What’s one mistake you’ve made that you won’t make again?
HC: Mistaking that more is better. I am guilty of feature creep in a lot of my apps.
CC: What’s the best decision you’ve ever made with your software development career?
HC: My best decision was to join buUuk.
Towards the end of my graduate studies, I was losing interest in research and grew apprehensive about pursuing it as a career. At that time, I discovered my interest in app creation, but only thought of it as a hobby or weekend project. When my first paid app generated revenue and significant interest, however, it dawned on me that I could actually do what I love for a living.
Coincidentally, I was approached by Jon and Mohan to start a company to create a mobile restaurant guide. I jumped at the opportunity, and we had our first prototype within 2 weeks. buUuk’s focus has changed, but I still enjoy my work very much. We collaborate with diverse clients on very interesting projects, and all this gives me a playground to express myself and explore various aspects of app creation.
CC: What’s your favorite open source component? Why?
HC: I use AFNetworking in almost all my apps. It is well designed, has great community support and gets lots of updates and improvements.
A lot of thought goes into creating open source components. In order to make them extensible, you have to generalise use cases and avoid overly-specific implementations. It is similar to making apps, except that your users are developers. I think I still struggle a bit with this, but I try to learn from the good open source projects available.
CC: What else should we know about you?
HC: I love anime, sailing and windsurfing.
CC: How has your work on open source projects affected your career? Have any prospective clients reached out to you because of your work, or have you noticed any other benefits?
HC: I’ve been approached for collaborations, but I think the most interesting part is that it opens up opportunity to get to know other developers. It’s a learning experience to me.
CC: I think that your Paperfold project is absolutely gorgeous. How did you come up with it, and were there any particular challenges in implementing it?
HC: It’s simple. The idea comes from how maps are folded, but I find it useful in many other scenarios.
I was not familiar with CATransform3D, but a colleague of mine is. @dilliontan gave me a quick intro so I can get started. There was a lot of trial and error.
PaperFold uses sliced screenshots of a view to create the folding effect. All screenshot-based animations probably have the same limitations with orientation change and large views.
After I completed PaperFold, I could not release the library immediately because I was getting black screenshots with
MKMapView in iOS 6 Beta when I used
UIGraphicsBeginImageContextWithOptions(). I went to a few lab sessions at WWDC to figure out why. I was directed from the Map lab to the OpenGL lab, and back to the Map lab before I was told that it’s a bug and to file a report. The bug was fixed in 2 releases after that. A Map engineer also suggested that I add shadows to alternate views in the fold to make it look more realistic.
CC: Do you have any suggestions to other iOS developers on how to best build beautiful, fluid, reusable components?
HC: Screenshot-based animations biggest limitation is the time to get the image. Avoid this if your component uses a large view and you don’t have a way to work around it.
Remember to use shadow path if you are using
CALayer shadow, but using an image is better. Be careful with
CALayer mask. I have not been very successful using masked views inside animations, or animations inside masked views. They tend to bring down frame rates.
Try to model your component after a built-in component. It is a lot easier to use for developers. PaperFold is a bad example because there are no equivalent components that I can model after. But I am creating new components that uses PaperFold to make it easier. I created PaperFoldMenuController that wraps around PaperFold, which is a drop-in replacement for UITabBarController, and PaperFold gallery that is similar to a horizontal table view. The latter isn’t released yet, but it’s coming soon.
Have a suggestion for whom we should interview next? Let us know at [email protected].