Aug 25

This app will tell you what’s your Chinese name is. You can search the name database to find out, and then save it as your favorite. You can display it as a name tag to tell everybody your Chinese name with customized colors!
Features:
- Search from 7500+ English names.
- Save as favorite name to be displayed later.
- Show your English or Chinese name as a name tag.
- Customize the colors of your name tag.
New names will be added constantly via updates.

App Store
Continue reading »
Aug 18

Gallery Of Tina
Today, our app Chinese Girl – Gallery Of Tina is Ready For Sale, please visit our app page to check it out!
Click Here to go!

App Store
Jul 27
In my last project, I used more than 100 images. It’s OK while I was testing it on the simulator. But when I uploaded it onto the device, it crashed all the time. I check the crash log, it showed as “low memory”.
I used this to load image:
| 1 | singleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"test.jpg"]]; |
When I run it with Instruments, I noticed that the use of the memory were increasing very fast and seemed to be not released. That's why the app crashed and through out a 101 error. It looks like that the imageNamed will cache images in the memory and only release the memory while the app terminate. Then I use imageWithContentsOfFile for a replacement of imageNamed:
| 1 | NSString* str = [[NSBundle mainBundle] pathForResource:@"test.jpg" ofType:nil inDirectory:@""];
|
| 2 | singleImageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:str]];
|
| 3 | |
The problem solved! You can see the snapshot of Instruments below, the memory were released when I changed to another category.

The imageWithContentsOfFile might be slower than imageNamed, but it is worthy to use it.
Jul 26
While, as we all know, OS 3.0 has been installed or upgraded on most of the iPhones, but, there are still a lot of iPod Touch not upgraded. So, by now, we still need to develop our apps based on the OS 2.2+ then try to make it compatible with OS 3.0.
When we test our apps on OS 2.2+ and OS 3.0, we found out that some thing different in the two platforms, so if your want the same code to be built for different OS, here is the trick to do it.
| 01 | - (void)viewDidLoad {
|
| 02 | |
| 03 | #ifdef __IPHONE_3_0
|
| 04 | NSInteger offset = -40;
|
| 05 | #else
|
| 06 | NSInteger offset = 0;
|
| 07 | #endif
|
| 08 | |
| 09 | /* Your code here */
|
| 10 | |
| 11 | [super viewDidLoad];
|
| 12 | } |
You can notice that we used pre-processor directives for the conditional compilation. But there is still a problem: we have to build two binaries for the different OS. What if we want to build only one binary that can be compatible with both platforms?
This code will do it for you:
Continue reading »
Recent Comments