// 色の割合を指定して生成する場合
UIColor *color = [UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0];
// 定義済みの色・パターンを指定して生成する場合
UIColor *color = [UIColor whiteColor];
/*
blackColor 黒
blueColor 青
brownColor 茶
clearColor 透明
cyanColor シアン
darkGrayColor 濃い灰
grayColor 灰
greenColor 緑
lightGrayColor 薄い灰
magentaColor マゼンダ
orangeColor オレンジ
purpleColor パープル
redColor 赤
whiteColor 白
yellowColor 黄
lightTextColor 灰色
darkTextColor 黒
groupTableViewBackgroundColor 灰色のストライプ
viewFlipsideBackgroundColor 灰色の斑
scrollViewTexturedBackgroundColor 布みたいな模様
*/
// 画像を指定してパターンを生成する場合
UIImage *hogeImage = [UIImage imageNamed:@"hoge.png"];
UIColor *color = [[UIColor alloc] initWithPatternImage:hogeImage];
最終更新:2012年09月20日 11:04