Display picker and textfield like in address book phone and email entries - iphone

How can i display a picker and textfield on the same box, like it appears when you add a contact on the telephone and email fields.
Tried searching for a solution, but could not find anything.

you can manage that view by making customView. and set it`s frame above your pickerView. on editing text(if keyboard) and didselected(if picker) set text of that textfield.
this is exactly like adding toolbar on keyboard or pickerview...
hope u got idea...

Related

Integrated Form Doesn't Move When Text Fields Are Selected

I have embedded a ScrollView within a UIViewController which contains multiple text fields that will act as a simple form to collect user data (Name, email, etc.). The problem is that when a text field is selected and the keyboard slides up, the text field is obscured by the keyboard. How can I slide the text fields back into view so that the user can clearly see what they are using as input?
You have to check for uikeyboard visibility ( see this post How can I programmatically check whether a keyboard is present in iOS app? ) and then call scrollRectToVisible for the selected textField. If you google about uikeyboard and scrollRectToVisible you will find many tutorial about this problem...

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";

Hiding PickerView and Box To Show What Was Selected

I am working on implementing something in my iOS app that I see in mobile websites all the time. I would like to have a TextBox or TextField of some kind that shows what value is currently selected. When clicked, it will present a UIPickerView with a list of possible choices. Upon selection, the UIPickerView will disappear, and the TextBox or TextField would get updated with the selection the user made. Can someone point me in a good direction for doing this?
You can save indexPath value in a string and show it on textfield like: [textField setText:NSString];

get cursor on textfield

I need to get the cursor in textfiled but on the textfileddidbeginEditing i have to open the picker view for selection , so for that reason i need to resignFirtsresponder to the textfield ,inorder that picker view is visible .But by doing this the cursor gets disabled as i open the picker (and the keyboard gets hide by resignFirst responder).I want to show the cursor as because when user cliks on partilcuar textfield so by that cursor he can track on which textfield he is making the selection.
Hope i am clear with my question.
if you want the picker instead of keyboard, set the text fields inputView as the picker... so when you tap the text field the picker will pop up like keyboard and the textfield will show the cursor too.. no need to dismiss the keyboard and then show the picker..
If I understand your problem right, this is just an usability problem. I think you can solve this if you just add some other mechanism for showing the user which textfield is in editing-mode.
For example add an text-color to the TextField. If the user disable the UIPickerView set the text-color back to the normal state.

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.