Kullanıcı ekranı yatay olarak döndürdüğünde bir video döndürme ve ölçeklendirme yapmaya çalışıyorum.CGAfflineTransformMakeScale/Rotation'ın kullanılması yalnızca bir eylemi gerçekleştirir
- (void) orientationChanged:(NSNotification *)note
{
bool switchedLeft;
UIDevice * device = note.object;
switch(device.orientation)
{
case UIDeviceOrientationPortrait:
self.videoView.transform=CGAffineTransformMakeScale(0.5,0.5);
if (switchedLeft) {
self.videoView.transform=CGAffineTransformMakeRotation(-M_PI_2);
}else{
self.videoView.transform=CGAffineTransformMakeRotation(M_PI_2);
}
break;
case UIDeviceOrientationLandscapeLeft:
self.videoView.transform=CGAffineTransformMakeRotation(M_PI_2);
self.videoView.transform=CGAffineTransformMakeScale(2.0, 2.0);
switchedLeft=true;
break;
case UIDeviceOrientationLandscapeRight:
self.videoView.transform=CGAffineTransformMakeRotation(-M_PI_2);
self.videoView.transform=CGAffineTransformMakeScale(2.0, 2.0);
switchedLeft=false;
break;
default:
break;
};
}
Bir çok sorun var. İlk önce manzaraya döndüğümde sadece bir dönüşüm yapar, bu konfigürasyonda sadece onu ölçeklendirir.
İkinci sorun, resme döndüğümde dönüşü çağırdığı, ancak hiçbir zaman dönmediğidir. Ancak ben manzara sol ve manzara sağ arasında gidip gelebilir ve düzgün bir şekilde döner. Herhangi bir yardım büyük beğeni görür