iPhone Developer's Cookbook

今日も第二章。Clipped Viewsってタイトルがはじめ全然ピンとこずに、何書いているのだろうと。

書いてあることは、部分描画、つまり描画が必要なところだけを描画して、それ以外のところは何もしないってことのサンプル。

drawRectは描画が必要なときに呼び出されるメソッド。カレントコンテキストの取得には、

CGContetxtRef context = UIGraphicsGetCurrentContext();

でできる。

iPhone Developer’s Cookbook, The: Building Applications with the iPhone SDK (Developer's Library)

iPhone Developer’s Cookbook, The: Building Applications with the iPhone SDK (Developer's Library)