Wednesday, 16 May 2012

pop up animation

popup animation by gaurav sharma


- (void)popUpView:(UIView*)view{

    [self.view.window addSubview:view];
   
    [view setFrame:CGRectMake(160, 230, 1, 1)];
    
    [UIView animateWithDuration:0.5f
                          delay:0.0
                        options:UIViewAnimationOptionBeginFromCurrentState
    

                     animations:^{
        [UIView setAnimationRepeatCount:0.0];
        [view setFrame:CGRectMake(10, 30, 300, 440)];
    }
    
                     completion:^(BOOL finished) {
        if (finished) {
            [UIView animateWithDuration:0.1f
                                  delay:0.05f
                                options:UIViewAnimationOptionBeginFromCurrentState
                             animations:^{
                [view setFrame:CGRectMake(20, 40, 280, 420)];
            }
                             completion:NULL];
        }
    }];
   
}

No comments:

Post a Comment