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 方法上将取消选择的图像添加到文本字段。