Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(デリゲート呼び出しに応答して) UIButton の色をライブで変更する簡単な方法が必要です。したがって、ボタンは白い背景 (標準) で描画され、デリゲート呼び出しが来ると、青/赤の背景に変更する必要があります。
私は試した :
btn.backgroundColor = [UIColor redColor]; [btn setNeedsDisplay];
これはうまくいきません...
また、ボタンのテキストの色を変更することもお勧めです...これはどのように行われますか????