Monday 3 March 2014

How to add animation in View for any view or any Control.



With bellow code you can set animation for any control or any view...

        CATransition *animation = [CATransition animation];
        [animation setDuration:1.0];// Set Duration
        [animation setType:kCATransitionPush];
        [animation setSubtype:kCATransitionFromTop];// set different type of Transition
        [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
        

        [[yourView layer] addAnimation:animation forKey:@"SwitchToView1"];// here you can set any view or any Control For Ex: UITableViewCell

No comments:

Post a Comment