UITableView with TextField and moving the view when keypad comes up - iphone

I have a UITableView that contains text field in each row. The text field is allowed to take only numbers and decimals. I have a transparent background button to help users click on the view to dispose the keypad when it is up. The text fields at the bottom of the view are getting covered by the keypad, so I wanted to move the view by capturing the textDidBeginEditing method etc and animating the view upward. The problem I notice is that after this code to move the view was added, if the numeric keypad is up and if I click on the view outside the keypad to dispose it, the background button does not receive the event so the keypad is not disposed. Can this be fixed? Thanks

I think the problem is the button does not cover the entire view. For your convenience you can make the button non-transparent and have some image on it to see its size.

Confirm the button is on the top of the view layer order.
Also confirm the button is there on the view after the view animation.

Related

Swift - UIButton as overlay on UIScrollView

I have a scroll view which contains different ui components such as text fields, labels etc.
The scroll view takes almost the full size of the screen. Logically separated, I want to add/display a button which is not a part of the content of the scroll view.
This leads to the problem that my button doesn't react on my touches. In case, I reduce the size of the scroll view so that the frames don't interfere with the ones from the button, everything works as expected.
I tried to bring the button to the front (view.bringSubviewToFront(infoButton)) but it still doesn't work.
I think you want to implement something like 'Gmail app, a plus button is floating at the bottom right of the screen.
add your scroll view to view and add other elements to scroll view:
view.addSubview(yourScrollView)
yourScrollView.addSubview(yourButton)
yourScrollView.addSubview(yourLabel)
after you finished adding scrollView's sub views it's time to add your button to -> View (not scroll view)
and everything should work fine as you expected
Issue is solved!
It is a matter of how you ad your sub views to the main view. In my case, I added the info button first to the main view followed by adding the scroll view to the main view.
You need to change the order. First you add the scroll view to the main view and then the button.

Adding Textfields to scroll view programmatically?

I am trying to add a textfield to a scroll view and outlet collection on button press, how am i to do this?
Can't seem to find my answer elsewhere.
You could just add it in the beginning, have it hidden, and bring it forward on the button press by either changing the .isHidden attribute or changing .alpha.
If you want to reposition other elements in the view when it's unhidden, you can add layout constraint outlets and activate new ones each time the button is pressed.

iPhone4 how to add/animate a UIView to appear under a UIButton?

I have a "side panel" like widget in my app that can be swiped in from the side of the screen. In order to help the users find the panel, I also added a UIButton to do the same thing - scroll the panel on and off screen.
The view comes from a different view controller, otherwise I would've simply created an extra panel in the interface builder and positioned it properly.
My problem is that the side panel gets positioned over the button, so if it is displayed with a button, it can only be dismissed with a gesture.
is it possible to specify at which "depth" I add a UIView when I programmatically add it in code?
This is the snipped that slides the panel in or out within the animation block.
self.audioSystemController.view.frame =CGRectMake(0,20, 120,460);
I need the UIView to be shown below a UIButton, so the button may be used to dismiss the view. I know this is redundant, but I cannot depend on the users to simply discover the side swiping gestures :/
Thank you for your help!
Check out the insertSubview:belowSubview: method of UIView.

iPhone Keyboard Adjust In View

I've been searching, but haven't quite found a complete answer, and the Apple docs aren't much help.
I have an application with a UIView that has a lot of text fields on it, ranging from the top of the view to the bottom. When the user clicks the first UITextField the keyboard pops up. The keyboard has three buttons above it, previous, next, and done on a toolbar InputAccessoryView.
Basically, let's say there are 6 UITextField boxes that space from the top of the view to the bottom. When the user gets past the third text field, the keyboard blocks the bottom three. How do I have the view adjust up when putting text in the bottom three text fields?
You need to place your textfields into a UIScrollView, and either translate the view above the keyboard when it is active and away when it is down, or another solution such as always having the keyboard up on that page, which'll save you the setFrame calls on your UIView/UIScrollView depending on what the keyboard is doing.
This will further help:
How to adjust the view position when the keyboard opens in iPhone?

appcelerator tableview autosliding

Using Appcelerator:
I have a form, a tableView with textFeilds
I want it so when I focus on them, it slides the window or the view to the top, under the navigation bar.
Right now, the keyboard is blocking the last few rows.
Do I need a listener on each form to slide? If so how do you do that?
You could add a focus listener to each of your textFields.
Then you should be able to move the tableview using scrollToTop or scrollToIndex.
If there are a fixed number of textfields you might want to try using a scrollview instead of a tableview. This will handle the move-up action for you when the individual taps in a textfield.