実装 実装してみよう。まずカスタムビューを定義しておく。 @interface CustomView : UIView { UIColor* color; } @end 初期化時にランダムもどきな色を決めてその色で塗りつぶす。 @implementation CustomView - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code CGFloat red = (rand()%255) / 255.0; CGFloat green = (rand()%255) / 255.0; CGFloat blue = (rand()%255) / 255.0; color = [UIColor colorWithRed:red green:green
![Cocoaの日々: UIScrollView - ページスクロールで空白を挟む](https://cdn-ak-scissors.b.st-hatena.com/image/square/084daedeff93e03fd4f0f4e0d098ed63d5be513b/height=288;version=1;width=512/http%3A%2F%2F3.bp.blogspot.com%2F_ZoUhefzk0CI%2FTKwWeE1WRWI%2FAAAAAAAAFe0%2F16uo0LBOWV0%2Fs1600%2F101006-0014-66%2525.png)