Adding text on image in iphone - iphone

How to add the text on image,and make it dynamic since the user will enter the text in the textfield and while preview of the image it should be as image,where text should appear where the user placed the textfield.

you will simply have to put a label with background clear and add it to the view where image is getting displayed. To make it dynamic, you will have to put up textfield (where user enters text) delegate methods. Once there is any change in the textfield of the user, update the label text.

Related

Changing placeholder text in xcode

I'm trying to change the placeholder text of my chatroom app's textfield every time that the user goes onto the page.
Is there a simple code to access into the placeholder text from inside my ViewController.m file (instead of just changing it from the storyboard drawing board area?)
basically I have a dictionary of values and based on arbitrary conditions I want the placeholder text in the text field to change whenever the user refreshes the tableview.
Do you mean
myTextField.placeholder = #"your placeholder text";

How to make a contact field entry like this on iOS?

I have an application in which when tapping a button it will show a view to the user to enter the contact number of the user, like in the image below. Can anybody help me achieve this? I need my users to chose their country within the flags and corresponding stdcodes needs to be there
What I see in the example: a UIImageView for the country flag, a UILabel for the country code and a UITextField with a placeholder for the phone number. You can set de value for placeholder in IB or programmatically.
You will have to create a custom view for that.
Steps to do it:
Derive a class from UIView.
Add UIImageView, UILabel and UITextField into it.
Layout it properly.
On button click, show this view with proper frames/bounds.
Create a view like whatever you have shown and initially make it hidden, when user click on the button make the view visible.
ON action event add this sub view into your view
In Xib file,click the label and see the right side properties,In that properties you will find the placeholder option.In that placeholder,type the text you want.That text will be appeared as a hint for the user when he taps it.Or otherwise,directly in your code where you declare the label,in that label code
label.placeholder=#"Enter Contact here";

Use textbox for date picker iphone developmnt

I am using a UIView to show a form with a text box(text), text box (want to attache this with datepicker) and text box (attach this wit picker to select multiple values)
I want to show date picker on click on text box but when I click on the texbox,it start showing the keyboard at bottom.
Will it be good to use read only textbox for date picker value or should i user table view for my form. Please suggest a link for that
I'm assuming you mean UITextField when you say text box. Check inputView property of UITextField. You can add a custom view instead of the keyboard.

How to cache text entered in the UITextField?

I have a requirement where i need to enter a text in the text field and when i come out of the view and again open the same view where text field is present, i need the text entered earlier need to appear on the textfield(caching) before the user enters the text for the second time.. Please help me..
Does the ViewController of the view containing the textfield get released if you leave the view? Maybe you should hold a reference to this ViewController that it won't be released and therefore your text is still present in the textfield.

UItextfield auto labelling

i'm having one text field, normally when touch the text field, keyboard will appear, is it any possibilities where when text field is touch one drop down list will appear to recommend value to be enter and value is selected it will appear in texr field
thanks
There's no automatic way of doing it but it is possible.
You would use the textFieldDidBeginEditing: delegate method of the UITextField to display a UIPickerView to your view. (You could also use textFieldShouldBeginEditing: depending on what you wanted to do.) When a user selected an item in the picker, you would add code to copy the appropriate text to the text field and, presumably, hide or delete the picker. You'd also need to hide or delete the picker when the text field lost focus.