How can I pause the dynamic animator in objc? - objective-c

I have two UIViews. I use UIDynamicAnimatior. I add gravity and collision to these UIviews. When the app starts, I want to pause the animation when I tap the screen or switch the app to the background. When I tap the screen again, the app will resume.

Related

React-native-navigation animate popping a screen?

So I have a react-native app which is using react-native-navigation.
Whenever I click a card in my app, it pushes me the card screen.
What I want to achieve is the following: when swiping down from that screen, as you swipe down the screen gets smaller and the other one is in the background, but I haven't found anything that can help me with that, any packages? Also, I'd have to pop the current screen to have the other one the background, but if I pop it, the current screen can't stay and get smaller as i swipe down.
So basically I need to animate a component pop.
If you haven't figured it out yet, you could show the card screen as an overlay or modal and add a swipe-down gesture to the Container component of the screen and when it reaches the bottom, you could dismissOverlay or dismissModal with no animation.

how to do a "app launch like" fade - zoom ios 7 transition?

I need to achieve the IOS7 app launch transition, in which the the detail view appears with fade effect according to the rectangle frame of the button that fired this view, as described in the image below:
So I have a main ViewController with six buttons, I want to make transition to the details viewControllers with fade and zoom effect, and starting the animation depending of the button frame.
I found RZTransitions, amazing collection of custom transitions, it does exactly what I want but for uicollectionView, I tried but can't get working to do the same for a viewController.
Thanks.

SpriteKit scene/node on top a paused scene

I'm trying to add a scene/node on top of a paused scene with a transparent background so the active scene view will still be visible.
I pause the scene with scene.view.paused = YES; but that means that everything is paused but the update method.
With Cocos2d one could easily push a new scene on top of an existing one but unfortunately SpriteKit does not have this capability.
Is there a way to pause a scene and add an active scene/node on top of it ?
A solution I've tried :
Creating an additional view controller with the pause-scene content and present it via the active view controller when needed but the background is always black so transparency is not achieved and some other problems occur with the original scene (I'll elaborate on these if needed).
It's all there. You do not have to present a new scene or view.
In a nutshell:
Pause the node where your game content is on that you want to pause. If you do all the processing in the scene class you'll have to refactor it, I'm afraid. The key is having a SKNode that acts as your "game layer" so that you can pause just that particular node. If you receive update: and other regular method calls to the game layer, it should check its self.paused state before doing any processing.
When you have that, pause the game layer node which will pause all the nodes and actions in it.
Now add another "layer" node with whatever UI you need to the scene. That could be your game over or pause layer, and it will be perfectly happy to receive input and run actions while the game layer is paused.

How can I make all my buttons "touch up insides"?

I created an app where users can touch buttons on a scroll view to go to another view, but when you scroll, it gets stuck on the buttons, and can only scroll when not touching the buttons.
So I suppose touch up inside would fix this but how would I make all my modal connections into touch up insides?
If you're using the storyboards, then they should be on touch up inside by default.
My guess is that your scrollview has Delays Content Touches disabled, you can set them via interface builder or self.scrollView.delaysContentTouches = YES;

Objective-c call touch on screen without user touching the screen

Im going to be using a framework that allows a iphone app to control my app on iPad. When i add it im going to make the joystick move a image of a mouse, and when the user presses the A button, i want to make the device think the user is touching at that point. Is there any way to do this?
Example: I place a button on the ipad screen at 0,0 with height and width of 100. then mouse is at point 50,50 and when the user presses and holds A, that button is held down, and when user lifts up, it calls that buttons action.