problem in TextFields - objective-c

I got a problem in textfields.Actually I have 4 textfields when I click on to the first textfield and i entered the text into it.If I click on to the next textfield with out clicking on to the Done button in the keyboard of the first textfield the view goes up and the text in the first textfield is erased.
To solve this problem I used [TextField2 setUserInteractionEnabled:NO];
to disable the textfield until the first textfield should completes.
But I heard that Disabling the User Interface is a wrong process and its not a good idea to use in Iphone Apps.
So I got an Idea when we are typing the text into the textfield itself the text in the textfield should be saved.
Hey guys please help me how to get this.
Any one's help will be appreciated.
Thank you,
Monish Kumar.

Are your text fields inside a UITableView? If so, make sure you don't reuse cells or reload data.

Related

Issue with UIAlertView buttons

In my app, I've allocated a new UIAlertView...A keyboard pops up in conjunction with its appearance and I can enter whatever I like into the UIAlertView's textfield.
I'm having a problem where, when I type on the keyboard, the color of the button located at index one on the UIAlertView changes every time I strike a key.
I've tried looking at all the right, obvious places...But cannot solve this.
I know a callback is triggered when I hit a key...But yeah.
Please help.
thanks

UIText field does not respond to touch after switching view

In my app, I have a text field that works fine, however after going back to the main menu and then back onto the page with the text field, the text field becomes un-touchable, the keyboard does not show no matter how many times you click it.
Here is a screen shot of the interface http://tinypic.com/view.php?pic=y11sm&s=6
I think I may have to add code or connect an action with the text field, but how?
Thanks for your time.
You can remove subviews that you don't use anymore like #Kim has already told you or if you need these subviews but they are blocking the action, you can bring your textfield to front using,
[your_view bringSubviewToFront: your_textfield];

textfield enable clear button but dont allow the keyboard to come up

Is there a way to have a UITextField with the text read only but still let the clear button work? I have a set of buttons on my view that interact with the text field so i dont need the keyboard to pop but if i disable the text field. the clear button shows up but i cant press it anymore. Is there a way to do this or should i make my own clear button?
Set clearButtonMode to UITextFieldViewModeAlways, and have the delegate return NO for textFieldShouldBeginEditing:.

adding an invisible button to the background in IB

I'm working with Xcode doing a Ipad app.
i simply want user to click anywhere on screen (not counting text fields) to perform some IBAction.I'm using an invisible button that covers my whole view.
Since I have some text fields in my view,i need to add this invisible button to the background of my user interface. I cant seem to find this option in the button attributes? any help?
Just set the button's type to custom.
Did you try setting the opacity of the button to zero?
I guess i got your point. You just want to put the UIButton(invisible) on the back of all the UITextField. The simple solution to this is open the Document Window in the IB. Now expand the view tree in the list view. Just drag your UIButton above the UITextFields and set the alpha value for the button in the property to be zero.
Hope this helps!!
iPad users don't "click". They "tap" or "touch".
In Interface Builder, I believe views are constructed with a z-index from top to bottom as they appear in the document window, so dragging your button so that it appears as the first subview of your main view should be a quick fix for this.
Have you considered other approaches? This doesn't sound like standard behaviour for an app and will probably cause havoc with anybody using Voice Over. What are you trying to accomplish?

Adding tooltip to UIbutton

Hey, am trying to figure out how to set up a button so that when the user clicks it a tooltip appears above it giving a brief description, similar to what happens when you click a pin in Google maps.
Does anyone have any ideas how to do this?
Thank
Hey, managed to get there in the end. What I wanted was a UIMenuItem and then just position it above my button by setting its frame