In my iPhone app i need to implement a different type of transition.
that was
next view open from the current view,
it stats like a dot, and the dot expands slowly like a circle with in the circle next view is to be displayed partially with in the part of the circle , finally the circle expands totally the next view appears completely.
I search lots of transitions like CATransitions, and some animations on cocoa controller, but i didn't find this type of transition, can any one help me please.
Well I think I can offer you a workaround. Instead of pushing to the next view like a dot . I suggest you add a simple dot animation in the
ViewWillAppear
of the view in which you have to get pushed. Now the push method would remain the same likeBut in the
ViewWillAppear
the code would be such that the dot would expand to a circle and reveal the New View beneath it. Hope you understand the logic I am trying to explain here. Any issue do let me know .in my case I did it that way:
set a
CAShapeLayer
instance as the layer's mask property of your custom view subclasszoom this mask layer to fullsize. code of your view:
the code of the mask layer:
from the documentation:
so I drew a circle with UIBezierPath to achieve the round mask. at the beginning I set the mask's scale factor to 0 so nothing of the view's layer is visible. then the scale factor is set to 1 (filling the layer's bounds) animated which gives a nice animation of a circle increasing it's radius from the center.
you might need one more animation shifting the center point of your view. both animations can be wrapped in a CAAnimationGroup.
Open in first view:
//Delegate method for annotation did select - (void)tapOnAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)map; { //To get the touch point of the GMS marker to set them as circle transiton pos CGPoint markerPoint = annotation.position; x = markerPoint.x; y = markerPoint.y;
Close in Next View: