Thursday, May 22, 2014

Use Automator export @2x image

Set Xcode Framework Search Path

Sometimes when you pull project from your friend, but xcode tell you that can't find Framework. You need set xcode framework search path $(SRCROOT) and it can solve problem.

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)