- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
float space=(SCREEN_WIDTH>SCREEN_HEIGHE?(SCREEN_WIDTH-SCREEN_HEIGHE):(SCREEN_HEIGHE-SCREEN_WIDTH))/2;
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
self.capture.delegate = self;
self.capture.layer.anchorPoint=CGPointMake(0.5, 0.5);
if (UIInterfaceOrientationIsPortrait(toInterfaceOrientation)) {
self.capture.layer.frame = CGRectMake(-space, space, SCREEN_WIDTH,SCREEN_HEIGHE);
CATransform3D transform = CATransform3DMakeRotation(0, 0, 0, 1);
self.capture.layer.transform = transform;
NSLog(@"==%f",SCREEN_WIDTH);
}else{
self.capture.layer.position=self.view.center;
self.capture.layer.frame = CGRectMake(space, -space, SCREEN_WIDTH,SCREEN_HEIGHE);
CATransform3D transform = CATransform3DMakeRotation(M_PI_2, 0, 0, 1);
self.capture.layer.transform = transform;
NSLog(@"--%f",SCREEN_WIDTH);
}
}