Saturday, April 6, 2013

Create ellipse shape and set color by delegate

Here's a way to create ellipse shape and use delegate to set what color the ellipse shape is.

In my app "Money42",it's has a switch button to set who pay the money.

When the switch button init,it will use delegate to set color itself.

The delegate method is only do one thing,that's return a color NSArray from NSUserDefaults which we set before.

Wednesday, April 3, 2013

Core Data Relationship and Relationship Delete Rules

If your data model is complex,you could need to set Core Data Relationship,

Take my App "FrozenTime" for example,It need to set two entity(Album and Photo).

Album and Photo is One-to-Many Relationships.

The red rectangle area is the "One-to-Many Relationships" look like.

Wednesday, March 13, 2013

How to loop a sound effect by SimpleAudioEngine

Recently,I wrote a game which need loop a sound effect,
but SimpleAudioEngine can't do that,
so I add a methon in SimpleAudioEngine.
If you need to do the same thing check out the code below...

Sunday, March 3, 2013

How to convert MP3 to CAF

If you try to make a game by Cocos2D,you may use some sounds in your game and many books will suggest to use CAF.

It's simple things.You don't need to buy any Software,You just need to use iTunes do this thing. (or Terminal)

Friday, March 1, 2013

How to autocomplete image name and show color selector in Xcode

Xcode is not Humanized to set UIIImage name and choose color.
Here is two tool for helping you do those thing fast.
The two tools is KSImageNamed-Xcode and ColorSense for Xcode.