たくさんのUIButtonを入手しましたが、そのうちのいくつかは状況に応じて色を変更する必要があり、現在は次のように処理されています。
UIButton *button;
button = [self.view viewWithTag:positionInArray];
[button setBackgroundColor:[UIColor cyanColor]];
button = [self.view viewWithTag:positionInArray-1];
[button setBackgroundColor:[UIColor cyanColor]];
button = [self.view viewWithTag:positionInArray+3];
[button setBackgroundColor:[UIColor cyanColor]]
button = [self.view viewWithTag:positionInArray+4];
[button setBackgroundColor:[UIColor cyanColor]];
動作しますが、ボタンをタグに設定するコードは次の警告をスローします。
"タイプ'UIView*'の式で'UIButton*__strong'を初期化する互換性のないポインター型"
これを正しく行うにはどうすればよいですか?