I have 2 text fields in the same view controller. I have added the "Clear Text Always Visible" option for both text fields in the storyboard. For some reason when I click the clear button for the second text field, both text fields clear. I cant find any information on this problem on the internet and am not sure how to fix it. Thank you for your help.
Here is a screen shot of the outlets, both are connected correctly and I have declared them as the delegates, the first text field has a tag of 0 and the second has a tag of 1
Related
I wanted a floating label text filed with underline or baseline for one of my iOS apps. I found that I can achieve that by making use of JVFloatLabeledTextField. So I drag & dropped some text fields to my storyboard and assigned JVFloatLabeledTextField as a class(custom) to those fields so that these text fields will be of type JVFloatLabeledTextField.
ISSUE1
In the below image the first part is what is showed after running the app. The issue here is when I start typing text in any of the textFields the place holder should animate upward but in my case the place holder is not showed/disappears as shown in the 2nd part of below image.When we tap on any other textField then the previously used textField palce holder is showed as shown in 3rd part of below image.
ISSUE2
keepBaseline = true, I have given this property to get the underline/baseline for the textFields, which I'm not getting.
I'm keeping all these text Fields in a stack view, will that cause any issue?
Programatically I haven't written any code for this.
Find the image here
I have a form and many UIPickerView and UITextField but I want to:
Hide some Picker View avec Text Field (here I'm going to use the attribute hidden) but I don't want to have a blank space, so how to do this?
When I select an item in the Picker View or input something in a Text Field I want to show the hidden item.
How to do this without having blank space?
Here is one approach :
One approach is to create the pickerview and textField in code and add it to the view.
This approach has the following advantages :
Since you are creating the textField only when you need it. Your
will not be using up valuable memory.
You will not have any white space.
I am creating a form in my iOS app in which certain text fields need to be hidden depending on the number that was entered in the previous field. For example if 1 is entered there will be one field, if 4 is entered there will be four fields etc. all the way up to 25. I understand how to hide the buttons depending on number...the problem is when I hide the buttons they still leave the white space because all the fields are set up to position at x and y height. I have tried to put the inputs into a table view because I thought it would allow me to hide each table view cell containing the input and then move the rest up. But XCode gives me an error saying I can't connect IBOutlet to repeating content. Positioning the x and y height in the code won't work either because I need to do this a few times and there would be too many variables.
I have looked for a solution everywhere and haven't been able to find a solution. Does any one know how to hide text fields and make everything else below move up?
You could use autolayout by anchor each textfield to the one above.
Or you could give a tag to each textfield and then iterate with a cycle for till the index of your previous view to setHidden:false to the textfields
I have a table view list and an add button at the top right. The user would press the button and a text field would pop up for a user to enter a string to be the label of the new item. Nothing new or special, what you'd expect from a "new playlist" type situation.
I am looking to have the small text field input that the user would type into. Most examples have the app move to a new view controller with a text field. I simply want a little box to overlay the current view that accepts a string. I cannot find/remember the name of the text box so I cannot find examples or code.
I think you are searching for something like
https://github.com/bmancini55/iOSExamples-DockedKeyboardView
Where your UITextField would be attached on the keyboard's accessory view.
OR
http://nshipster.com/uialertcontroller/
Where you use an UIALertController with an input field. I think the second one will resolve your problem more than the first one, because you are asking for a pop-up solution.
Hope it helps
I've got a number of buttons in a view and have assigned a tag number to each for identification in code. I just went back to check one of them, and can't find the field in the Attributes Inspector where I originally assigned the tags. I've tried all my buttons and restarted Xcode, and the result is the same--no tag field.
Here's what my attribute inspector looks like with a (tagged) button selected in the storyboard:
I came upon a recent comment by someone who also couldn't locate the tag field. He also is using Xcode 5.0.2.
Anybody else run into this?
Thanks!
The sections in the attributes inspector can be shown or hidden by clicking on the lines where the words "View", "Control", etc appear. When you rollover the line with these section titles, you'll see the words "show" or "hide" appear on the right edge of the line. Clicking anywhere on the line toggles between the two states.
Where it says view: Move your mouse over to the far right and something should appear that says "Show". Click on it and you'll see the tag identifiers, etc.