view raw
Saranjith Saranjith - 5 months ago 48
Objective-C Question

Making Menu coming From Left Corner in iOS

I want to make an Menu Animation just as shown below.

enter image description here

I need to have UIButtons inside the menu.
How can i achieve this.


for this animation you should set anchor point by default the anchor point position is (0.5,0.5), so can change the anchor point position:

All geometric manipulations to the view occur about the specified point. For example, applying a rotation transform to a layer with the default anchor point causes the layer to rotate around its center. Changing the anchor point to a different location would cause the layer to rotate around that new point.

self.view.layer.anchorPoint = CGPointMake(0,0);

self.view.transform = CGAffineTransformMakeScale(0.001,0.001);

[UIView animateWithDuration:1.0 animations:^{
          self.view.transform = CGAffineTransformIdentity;