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.
テキストフィールドが選択されている場合にのみ、テキストフィールドの背景画像を変更したいアプリケーションがあります。次に、選択されていない場合は前の画像に戻しますか?誰かがこれを達成するのを手伝ってくれますか?
didBeginEditingメソッドで、このコードを追加しますmyTextField.background = [UIImage imageNamed:@ "selectedimg.png"]; そしてdidEndEditingメソッドで、選択解除された画像をテキストフィールドに追加します。