Expandable View with scroll view in react native issue - react-native

I created nested expandable view and when scrolling up or down user click on a view to expand it than that touch doesn't respond but once scroll gets it position. User can click and it will respond to expand it.
I can solved it by setting bounces property as false but i don't think it is a good way to handle this.

Related

React Native - ScrollView/ListView lose their scroll positions after pushing a new scene

Essentially I just need this for my ListView, but ScrollView would probably be useful too. So when I scroll down a page in a ListView, click an item pushing to a new scene, and then pop back I want to remember where I was, else the user has to scroll all the way back to their previous position again which could be pretty frustrating.
Any help would be grateful.

Can't seem to achieve the same effect on my slide menu as Any.Do

I am trying to create the same type of slide-up/pull-up menu (from the bottom) as the Any.do iPhone app, but not having any success.
The issue I am running into is the app was built with storyboards so I am thinking I might have to scratch that idea and use just code.
Any ideas?
There is no need to get rid of your storyboard to recreate this, that's what IBOutlets are for. Any way, it looks like this was made by creating a UIScrollView that takes up the entire screen. Then add a UITableView to the upper section of the scroll view. Mind you in order for this to work, you'll need to disable scrolling on the scroll view in the background.
From there you can programmatically add the other elements to the scroll view to be rendered off screen, since there are only three they can probably just be buttons. And finally, since scrolling is disabled on the background scroll view you can add an image with a UISwipeGestureRecognizer at the bottom of the screen to manually change the scroll view's content offset property.

Adding a scrollview and get it to zoom

In my iphone app, you get a UIView with a background image and a "start button".
When you hit the start button, the start button will be hidden, and your background aswell. You will see another image. You will also get a "back button".
You should be able to zoom the image and scroll around.
I want everything on the same UIView.
When you hit the back button, everything should get back to the first background image and the start button, and you should not be able to zoom or scroll.
How can I do this? And is it possible at all to hide a scroll view in order to just show a regular screen, in the same view?
Thanks in advance!
EDIT: Ok, I know how to hide the scroll view now, but when the scroll view is shown, you can't scroll! I have made the scroll view bigger than the screen and put a label below the "original screen". How to get it to scroll?
Add a UIScrollView to the main view in which you have the zoom/scrollable image. Simply remove it when the back button is pressed.

Transition to Modal View Controller with Keyboard Visible

Is it possible to present my modal view controller with the keyboard already visible? Currently, the modal's text view becomes the first responder as soon as it's view is loaded, which causes the keyboard to animate coming up from the bottom.
I'd like the keyboard to already be on the modal and be a part of it's transition. Any suggestions?
The keyboard is a separate UIWindow object. It is not in the same view hierarchy as your view controller's view. To make this happen, you would have to dig around in the UIApplication's windows property for the keyboard window and replace its default animation with a custom animation.
You could try putting the becomeFirstResponder code in vieWillAppear, but that isn't the "right" thing to do anyway.
You will probably need to replace the actual keyboard animation with a custom animation to force it to load immediately and without scrolling up.

Could the view to be pushed up when the keyboard occur?

I have created some textfields at the bottom that required users to entry. Is there any method that can push up the view automatically when the keyboard occur?
See Apple's Moving Content That Is Located Under the Keyboard, or this implementation based in Calculating Area Covered by Keyboard.
Basically you have to mount your view on a UIScrollView and add a bottom content inset with the same height than the keyboard. Then scroll using setContentOffset:animated:. This is a generic solution that you can reuse.
A more simple but non generic way is, if you have enough space at the bottom of your view without editable controls, you just scroll to a fixed position for each edit box.
use the -contentoffset property of your view.