System Modal Transition Animation Settings? - iphone

I feel like this information is out there somewhere, but my Google searches came up with too much unrelated info to track down exactly what I was looking for. Basically I'd like to perform a UIView animation that matches the system's default modal view controller display animation (UIModalTransitionStyleCoverVertical). I'm going to be doing this animation on a container view so I can make it partially transparent. No matter what settings I use I can't seem to match that transition though, and it looks a bit weird.
Here's my question: Does anyone know the animation settings used to match the system's default modal transition? Duration, curve, etc. It seems like an EaseOut curve, but that doesn't seem to match either.

Related

Avatar removed from Pivot point

I was animating an avatar, and was trying various things out, and all of a sudden she was transformed from her pivot point. She also lost the T-pose. I couldn't figure out how to get her back to the original state, removing the animation didn't help. I am going to deleting that avatar and start over, but first I want to learn from this.
I am really looking for a few things here:
how could that happen? It looks like somehow the state at some point of the animation became the new "ground" state or something.
is there anyway I could inspect this state, edit it, or failing that, reset it?
is there something I should read somewhere to understand this better? I found nothing
Screen shot of displaced avatar:
The top level inspector in the heirarchy:
Here is one with the animator controller:
Update:
The key was the suggestion by Fiffe that you need to make sure your flow gets to your exit state. In my case I was neglecting to do that.
There's few things that might be causing this. You probably wanna play around with animation clip settings - you can find them by selecting animation clip.
You can read more about it here https://docs.unity3d.com/Manual/class-AnimationClip.html
You probably want to turn off Apply Root Motion in your Animator too.
If that doesn't help you should check if you don't have any empty states (without animations) in your animator controller.

iPhone iOS how to create interactive drag, rotate, resize, delete view control?

I got an app that allows users to add content to a canvas. I would like to be able to offer the user an ability to move, rotate, resize, reflect this content. Currently I'm doing this with gestures, but would like to know if there is some sort of open-source widget that draws a box around the view and adds 4 buttons to do these functions:
rotate 90 degrees
rotate freely
resize
delete
Can anyone think of an open source framework that I can add to my project to create controls like the ones displayed?
I can probably build this by hand, but debugging gesture recognizers and view rotation is not the most fun thing, so I'm looking for something more polished.
Thank you!
Here's a link to an open source control on cocoa controls that looks like something you could use: TDResizerView.
"TDResizerView is used to resize and rotate an imageview with single finger"
Sounds like a good place to start from, even if you need to modify it.
I've never used this particular control though, so take my word for what it's worth.
edit: Also keep in mind that on iOS, users generally expect gestures. Forcing them to use the handles instead of pinching or rotating may be bad for your user experience, depending on why you want the handles instead.

iphone image carousel

I hardly know how to explain my case other than to point to the excellent Absolute vodka app, Drink Spiration.
I am trying to make a carousel like image browsing with a little spice. I would really like to find a simple core animation explanation on how to accomplish something like the above app.
I hope someone can help with this. The solution doesn't have to be exactly the same, but just explain what is happening and it would be best if it was simple and no opengl. Just something to point me in the right direction. I don't think using just a scrollview with uiimageviews is enough.
I wrote something similar and its quite easy once you figure it out in your mind. All done justing using regular old views and animating transforms on them.
Say its 3 images on screen, and you can rotate new ones on and off ... then you will need 5 views set up (most simply just a UIImageView with a relevant image set). They are the currently selected image, the two either side of it and the ones that are, or will be animating on or off when the user flicks left or right.
Each of these 5 images has a position, an angle and an image. When the user flicks left or right each gets animated to the next position and angle, views that are about to come onscreen have their image updated to the next image in the set. If the user keeps on flicking in the same direction you simply reposition views on one side as they come off the other.
With this setup you can do lots of cool carousel like things very simply.

constricting scrolling in core-plot

I would like to have my user scroll inside a CPXYGraph. I have a CPXYGraph as part of a CPHostingLayer, like in the tutorials. I enabled allowsUserInteraction, which is cool and allows scrolling. But I don't want to allow my user to scroll to 'infinity', which it seems like it allows-you can keep dragging further and further away from where the data is on a plot.
How do I constrain this so that the user can only scroll within a certain bounds?
I also enabled masksToBorder, and set the outerBorderPath and innerBorderPath to something arbitarily small, but I saw no changes, so I am not sure how those are supposed to work.
I could not set maskingPath and subLayerMaskingPath because they seem to be read only(no setters), though i feel like these two properties might be what I am looking for.
Anyone has run into this situation? Would be glad if someone could shed some light. Thanks!
The masking properties only affect the drawing. You need to use the globalXRange and globalYRange properties of your plot space. These define the maximum range that can be scrolled into view. See the example in CPTestApp.

Making an icon "jump" with iPhone core animation

What would be the best way to make an icon seem to "jump" from a toolbar into a UITabBarItem.
I have found the CAKeyframeAnimation class which looks promising but I just can't get it to work. I have been using code similar to this : http://www.bdunagan.com/2009/04/26/core-animation-on-the-iphone/ but no matter what I set my endPoint to, the icon always ends up in the top of the screen.
I'm trying to achieve something similar to the effect used when you move a message in the Mail application. Is CAKeyframeAnimation suitable or is there an easier way to do this?
Thanks in advance.
When you say "the icon always ends up in the top of the screen", do you mean that the animation runs, but the icon hops back to the top of the screen at its completion? If so, make sure that you've set the animation's fillMode to kCAFillModeForwards and its removedOnCompletion property to NO.
For another example of a CAKeyframeAnimation that animates an object along a curve, see my answer to this question.