brentvatne / stargrave-0

preserving my stars for vanity. former home of react-native-modal
389 stars 65 forks source link

Transition like UIActionSheet ? #28

Closed aksonov closed 7 years ago

aksonov commented 9 years ago

I'm trying to do transition like in UIActionSheet when modal window come from bottom (i.e. height from 0 to about 200). How to achieve it? I'm trying

transition('height', {duration: 250, begin: 0, end: 200});

But it decrease height of underlying background, not modal itself.

brentvatne commented 9 years ago

@aksonov - unfortunately the transitions only apply to the container right now, but we could add an additional hook for that here: https://github.com/brentvatne/react-native-modal/blob/master/Modal.ios.js#L162-L167

If you're willing to dig in and have a crack at it, a PR would be appreciated!

aksonov commented 9 years ago

Thanks, will try it but can't see now how to handle animations within react-native without iOS code... Looks like we need something like react-tween-state but i don't sure that will works for react-native?

brentvatne commented 9 years ago

@aksonov - yeah, I'm using that here actually - we just need to apply separate animations to the backdrop and the modal view