动画跳转片段 ios

- (void)showPlanView

{

     NSLog(@"%@",self.navigationController);

    UIImage *image2 = [Common imageWithView:self.navigationController.view];

    UIImageView *imageView2 = [[UIImageView alloc] initWithImage:image2];

    [self.navigationController.view addSubview:imageView2];

    [self.navigationController popToRootViewControllerAnimated:NO];

    [[NSNotificationCenter defaultCenter] postNotificationName:@"goToPlan" object:nil];

    

    [self.navigationController.view bringSubviewToFront:imageView2];

    

    [UIView animateWithDuration:0.35 animations:^{

        imageView2.transform = CGAffineTransformMakeTranslation(-kDeviceWidth, 0);

    } completion:^(BOOL fish) {

        [imageView2 removeFromSuperview];

        [imageView2 release];

    }];

}

你可能感兴趣的:(动画跳转片段 ios)