How do I put readonly text inside a UITextField. For example, the "Name" and "Security" fields in the iPod touch "Other networks" settings contain, respectively, the words "Name" and "Security", with an editable area to the right. UITextField has a "placeholder" property but that disappears as soon as I type.
A:
What you're seeing in those fields is not that the UITextField has a label but that the UITableViewCell has two controls on it - a label and a textfield without a border.
rein
2009-10-08 08:16:39
I only need to have two textfields so I was hoping to avoid having to implement a UITableView.
twelshesgi
2009-10-08 14:02:58
It's not really wrong or hard to implement a UITableView to host two text fields - and having control over the UITableViewCell for labels is a bonus.
rein
2009-10-08 15:31:36
A:
simply put this line where txtname is object of UITextField txtName.userInteractionEnabled = NO;
suchita
2010-07-23 11:50:35