How to make a UItextField with a UIPickerView - iphone

i wanto to make somethink like this http://tinypic.com/r/33m8vmo/7 . I want to know if it's just a UItextField with a picture in the right or not ?
and my second question is why i don't have this in my interface builder ? http://tinypic.com/r/121txd5/7 i just have this http://tinypic.com/r/34dgah0/7 ?
Help me please , i'm a newbie :(

Again it is pretty close to this one. You will have to set the desired view (in that example, it was the UIDatePicker instance) as a text field's input view. Take a look at the example in the answer and you can model UIPickerView instance to be the input view in a similar fashion.
As for the second question, the control you want is a Cocoa control and not a Cocoa Touch control. You will have them available when developing for mac.

Related

Customizing suggestions in a text view in iPhone

I have a textview. When we are editing a textview, we can see suggestions as shown in the image. I want to customize the suggestions. ie, Instead of the default words in suggestion box, I want to show words from my array. How can i do this?
Thanks in advance...
To disable suggestion there are 2 methods:
First one is:
UITextField* f = [[UITextField alloc] init];
f.autocorrectionType = UITextAutocorrectionTypeNo;
Second one is:
The Interface Builder also has a dropdown field to disable this. As you're more likely to create textfields in the interface builder, look for it there. You can find it in the Attributes Inspector next to 'Correction'.
For your array in suggestions go through this link:https://www.cocoacontrols.com/controls/autocompletiontableview
Disable autocorrect for that text view, then have a custom view ready and place it above the other views matching wherever the cursor is. There's probably other SO posts to find out where that cursor is...
You'll probably use the delegate pattern 2-way. One way, the custom view is made aware of changes in the UITextView so it knows when to update itself's suggestions.
The other delegate is your view or the textView, notified when someone hits the button.
This should all be easy to make, the only hard part is figuring out how your custom view's logic will behave

Discarding picker iOS

Recently I've submitted an application to Apple and they told me that to show a UIPickerView in iPad I have to embed it into a Popover, so the discarding is as easy as touching outside of the Popover...
How I'm supposed to discard a UIPickerView with iPhone?
I don't want to push another view and then return to the initial view to make the selection because it would interrupt usability flow.
On my current implementation I'm showing the UIPickerView below the selection UITextField and discarding it with a UIButton... is this method correct?
Kind regards!
No, the correct method is precisely as Apple explained to you. You need to put the UIPickerView -INSIDE- a UIPopover. Below is a link to another question/answer that would be a good reference for you:
UIPopoverController too large and UIPickerView too small

xcode 4 - Date picker

is there a way to have the date picker smaller or with different size?
I have been trying to make it small programatically but it seems like there is no luck.
any help?
no you cannot
if you want you may customize your own date picker using pickerview
Date picker is not customizable.
If you have lots of time you could create your own UIView object (with your custom background) with one (or more, better if configurable) UITableView scrolling-paged inside (and other object, like the light blue indicator) and show this UIView inside a UIActionSheet (you will get animation in/out for free).
It's not a easy solution, but it is.
If you'll create this component, any code released open source is really appreciated.

Focus and zoom in on a UITextField when touched?

How in the world does one get the iPhone view to zoom in on a focused UITextField? I need to tap on a text field that I want to edit, and my view should zoom in to the tapped text field and pull up the keyboard (which it already does), similar to how many Internet text fields gain focus on the iPhone. Is this some type of overlay?
I've been looking everywhere for this solution but maybe I've just got the wrong terminology. Thank you in advance.
Could be a duplicate of this StackOverflow question.
In essence, there are a number of ways, but you have to program this effect manually. A textfield is already an overlay. You can either move it, or scroll the containing view.
Please follow the following steps.
Implement the delegate method for all textfield.connect the outlet of textfield in interface builder basically it's setting the delegate property.then in delegate property you can defined the method whatever you want to implement or wanted to do functionality.
Thanks

iPad custom Keyboard GUI

I want to create custom GUI for keyboard layout instead of normal layout. How can I achieve this?
Can anyone help me ?
Is there any built-in style/layout available or do I need to create a view for same?
Thanks,
Jayesh
You use the inputView property of a UITextField or UITextView. Simply assign it a custom view of your own. Then, when the receiver becomes the first responder, the system will automatically show your custom view as the keyboard. It will also hide it, when resigning first responder.
As far as I know, there are no templates.
I collected a view links about this topic with screenshots of keyboard-layouts + links about the programming-background. The article is in german but the links are all english: http://uxzentrisch.de/custom-mobile-keyboard-design/
Thanks for your answer, Jorge!