iphoneアプリ開発、drawRect、initWithFrame

drawRectはビューの再描画が必要なときに呼ばれる。
addSubViewしたときとかに呼ばれる。
自分で再描画したい時は
[self setNeedsDisplay]


interface builderのviewを選択して、
identity inspectorのcustom classに
自作したクラスを設定すると、
interface builderのインスタンス生成時に
自作したクラスの
initWithCoder→awakeFromNib
がこの順で呼ばれる。
initやinitWithFrameは呼ばれないので注意。

TORQUES LABS
http://labs.torques.jp/2011/05/10/2030/
memo.393
http://memo.393.bz/archives/1317