Wednesday, September 17, 2014

[Swift] Image Dump

目前大多的工作是設計方面的,
對於了解視覺方面的事情平時自然也很有興趣,
所以用 Swift 寫寫圖片相關的東西了解運作也是很正常的。

回到主題,之前是因為看到有人用 Objective-C 寫了一個 Image Dump,
而最近因為寫一個簡報,就順手改寫了個 Swift 的版本,
也把一些筆記整理進來。

Thursday, May 22, 2014

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...