How to set placeholder in uitextfield programmatically?

How to set placeholder in uitextfield programmatically?

Can any one tell me about the example code for setting the placeholder in a UITextField programatically?

Thanks

View Answers

March 22, 2015 at 11:31 AM

HI,

Its easy. Use the following code:

mytext.placeholder = @"Enter User Name";

Thanks









Related Tutorials/Questions & Answers:
How to set placeholder in uitextfield programmatically?
UITextField Background Image
Advertisements
UITextField Programmatically iPhone
UITextfield checking
Example code of adding placeholder in UItextFeild
UItextfield blank
UITextfield Background Color
How to set cookies?
How to set the cursor to wait?
how to set class path
uitextfield append text
ModuleNotFoundError: No module named 'placeholder'
how to set the values in jsp
how to set background image
uitextfield hide keyboard on return
How to set NSZombieEnabled iPhone
UINavigationController how to set title
How to set target to videos??
uitextfield disable keyboard
how set data in a dialog
how to set image - EJB
HOW TO DISPLAY 2 SET OF CONTROLS
how to set the value of textfield constant
how to do dynamic ally placeholder using properties or some else - JSP-Servlet
ModuleNotFoundError: No module named 'js.jquery_placeholder'
ModuleNotFoundError: No module named 'placeholder-pics'
ModuleNotFoundError: No module named 'python-placeholder'
ModuleNotFoundError: No module named 'tgapp-placeholder'
ModuleNotFoundError: No module named 'django-placeholder'
ModuleNotFoundError: No module named 'js.jquery_placeholder'
how to set folder size in php
how to set time in jsp page
how to set size of button,textfield.
How to set Marathi font to Label??
how to set value of dropdown list
how to set value of dropdown list
ModuleNotFoundError: No module named 'cmsplugin-template-placeholder'
ModuleNotFoundError: No module named 'json-placeholder-client'
ModuleNotFoundError: No module named 'cmsplugin-template-placeholder'
ModuleNotFoundError: No module named 'djangocms-placeholder-attr'
ModuleNotFoundError: No module named 'django-images-placeholder'
ModuleNotFoundError: No module named 'django-media-placeholder'
ModuleNotFoundError: No module named 'json-placeholder-client'
TensorFlow placeholder matrix
how to set a image in frame? - Swing AWT
How to add a columns with a button set to a Jtable built with database result set
How to set CLASSPATH in Java?
How to set heap memory in cassandra on docker
How to set pdf background color.
How set the height of Thumb in Vertical scrollbar..?

Ads