配列の要素の値から、そのキーを取り出す場合。
<?php
$array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red');
$key = array_search('green', $array); // $key = 2;
$key = array_search('red', $array); // $key = …
iPhoneアプリに設置されているテーブルの背景色を変更する方法です。
//テーブルの背景色
self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
文字列の設定と同様に、以下のような記述も可能です。self.view.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0];
この投稿へのコメント
コメントはまだありません。