Custom transition passing mapView - objective-c

I'm looking for idea how to resize map to full screen when tapping on it. It came to my mind that custom view controller transition my do the job. Only problem is I don't know where exactly should I pass frame from first view and animate it on second? Can't find proper example of doing that.

Related

React Native: ScrollView with auto scroll

I would like to create a carousel that scrolls automatically until the user scrolls / touches the ScrollView itself.
The auto-scrolling itself works fine with using scrollView.scrollTo but how could I detect if the user is interacting with the ScrollView? I took a look at the onScroll event but this does not seem to distinct between a user generated event and an event that was generated by calling scrollTo.
Also I'd like to know if it is possible to get the current scroll position from the ScrollView directly instead of reading it everytime from the onScroll event.
I'm very thankful for any tips and suggestions.
By digging into ScrollView's source code you can notice a few undocumented callbacks that will help you achieve what you're after, namely onTouchStart and onTouchEnd. These two callbacks are triggered only when user interacts with the ScrollView and not when you scroll programmatically.
You will probably want to clear your auto-scroll interval on onTouchStart and restart it after a delay on onTouchEnd.
Regarding your next question, the answer is no. As far as I know, no getter is currently exposed to retrieve the current scroll position. Therefore, you need to rely on the event passed to onScroll, retrieve event.nativeEvent.contentOffset['x' or 'y'], and store it in your component's state.
Note that if you're doing some heavy animations that need to follow scroll position closely (e.g. animated header or parallax image), it would be a good idea to use the native driver for Animated.event. You can learn more about it on React Native's blog.

Change the animation from pushViewController to vertical

I have 2 collectionViewController, each filled with cells with images where I can scroll through horizontally. Both are nested on a navigationViewController.
Now, if I push a button, one controller shall switch to another with push:
[myNavController pushViewController:collectionViewController1 animated:YES];
How can I change the animation so the collectionViewController doesn't appear from the side, so that it comes in from the top/bottom?
Thanks for the help!
Edit:
I solved the problem another way:
I nested the 2 CollectionViewController inside a ScrollView.The Scrollview has the height of two screens. Now I can swipe from one to another CollectionView with no huzzle :). Good luck!
If you want it to push onto the navigation stack, then you need to implement your own custom animations for this. However if you want it to just display on top of the current viewController you can use the modal presentation for this.
Edit:
Here is a tutorial that should get you started.
http://www.appcoda.com/custom-view-controller-transitions-tutorial/

swift adding zoom to container view

I have a page view controller embedded inside a container view in order to swipe between images. But now I am trying to add a touch that will make the image go full screen "lightbox" with zoom available and also swipe through the images while in full screen mode.
I can get it to work, and messing around with auto layout seems to be much work consider I have a lot of other stuff in that VC.
So does anyone know a good image slider from github written in swift? - without the need of cocopods.
thanks!
It's easy enough to write one yourself. In full-screen mode, use another UIPageViewController, because it already has the swipe left & right support built in.

How do I ensure that animations work correctly across all views

Is there a standard way to have views that are de-activated have an animation which slides away or a view brought active to slide in?
I was thinking of having a base controller for the view port, and then an event 'activeitemchange' which sets the animation of the view coming in. But when I inherit my controllers from the base controller I get the following error:
Failed loading 'http://localhost:1212/touch/src/app/AppController.js'
Not sure what the problem is, or even if this is the correct way of achieving this...?
Here's an example using a navigation view where the animation is set only once in the navigation view's config.
http://www.senchafiddle.com/full/!izRlK/
Hope this helps

Showing a keyboard in iOS without animating

Does anyone know if there is a way to show the keyboard in iOS without animating it? Or better yet, can you change the animation speed?
Thanks
The only way I know of, is pushing a view controller which has a view which is made first responder in -viewDidLoad. (viewWillAppear will probably do fine as well)
Pushing it without animation might get you a keyboard popping up without animation.
update too bad, it seems either the view animates into screen (modally or pushed on the navigation stack, with animated:YES) with the keyboard fixed, or the view comes up without animation (i.e. animated:NO) making the keyboard animate into screen again.