"set uitextfield as non editable - objective c" Code Answer

2

firstly, the [...] aren't needed if you're not sending a message.

number.editable = no;
[number resignfirstresponder];
password.editable = no;
[password resignfirstresponder];

but this is not the cause of error. the .editable property is only defined for uitextview, not uitextfield. you should set the .enabled property for a uitextfield (note that a uitextfield is a uicontrol).

number.enabled = no;
...
By Dinesh Raja on August 14 2022

Answers related to “set uitextfield as non editable - objective c”

Only authorized users can answer the Search term. Please sign in first, or register a free account.