how to open new view on touch even for uitextfield - iphone

I am just woundering if it is possible and if so how I could go about loading a new
view when the user touches a uitextfield?
What I am trying to do is load a new view where the user will use a picker to populate the UItextField instead of typing the word.
any help would be greatly appreciated

What you need here is the inputView property of UITextField. If you set this for a text field, then instead of the usual keyboard, the inputView object will pop up. I had created this example for a related problem which uses a UIPickerView as an inputView to a UITextField object. You can check it to see if it helps.

Related

Replacing keyboard with picker view when textfield is tapped (Swift, Storyboard, iOS 9, Xcode 7)

I can't seem to find how I could replace the keyboard when I tap a textfield in the following context:
I have a view controller with a tableview dragged into it with one prototype cell, and in that cell I have 4 textfields. As for my swift files, I have one for the table view (view controller) and one for the cell itself.
I was able to replace the keyboard with a datepicker for one textfield, but do not know how to proceed for a picker view...
Thank you in advance for any help/advice given! Please let me know if you need more detail.
Cheers,
Laroms
As far as I understand, you are asking to change the input type of the UITextField.
You can make use of inputView property of the UITextField. Set the inputView for the required textField as UIPickerView. It'll automatically change the input type.

UIPicker in inappsettingskit

Using inappsettingskit, I'm searching for a way to display an uipickerview (with custom values) when clicking on a textfield cell (instead of a keyboard).
Is there any way to do so ?
Thanks for your help :)
Read the setting in you application and for showing picker view instead of standard keyboard use UITextField inputView property.
myTextField.inputView = myPickerView;
From Apple Documentation for inputView .
If the value in this property is nil,
the text field displays the standard
system keyboard when it becomes first
responder. Assigning a custom view to
this property causes that view to be
presented instead.

Remove keyboard or place Picker View on TOP of keyboard

Anyone has any idea how one can achieve the same look as when you press on the "From:" in the Mail iphone app when you have more than one user account.
I'd like to remove my keyboard, but WITHOUT animating it. Rather just disappear and instead of it have a UIPickerView appear.
Thanks much!
Since iOS 3.2 you can set the inputView property of a UITextField to a custom view. This view is then shown instead of the keyboard as input for that view.
There's no way to achieve this before iOS 3.2 I know.
UITextField Class Reference

UITextField does not show the assigned string

In my project (my first one) I try to assign a text to a textfield created in the Interface Builder.
[date setText:#"2010"];
I also tried using
date.text = #"2010"
I have created the Outlet and don't get any error... the text just doesn't show up.
Just in case it matters...
I prevent the keyboard from showing up and display a calendar instead (works).
Any idea what could be wrong?
Could it be a problem that I'm using delegate methods on the textFields to prevent displaying the keyboard?
If you don't want to edit text using a keyboard, then what is the use of UITextField?
Instead of using UITextField you can use a UILabel (as a global variable) to show the text and use a custom UIButton without a title and use its action for showing the calendar view. You can change the text of the label whenever you want in that class like viewWillAppear or viewDidAppear.

UITextField focus

How can I programmatically assign focus to a specific UITextField in a view? I have several fields and on view display, I'd like to put the cursor on a specific field, not the first one at top.
Try doing this in viewWillAppear:
[desiredField becomeFirstResponder];
By making the field the first responder, it have focus and the keyboard will be displayed.
Set the first responder for your view to be the text field. This can be done in IB.
In swift:
desiredField.becomeFirstResponder()