我在uitextfield上插入了一个图像。像你在大多数登录界面看到的一个小图像。问题是用户可以输入该区域。如何使该区域不可编辑。所以用户只能输入那个形象
Seems that method - (CGRect)editingRectForBounds:(CGRect)bounds
is what you are looking for UITextField Class Reference :
You should not call this method directly. If you want to provide a different editing rectangle for the text, you can override this method and return that rectangle. By default, this method returns a region in the text field that is not occupied by any overlay views.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.