Merhaba IOS8'de sunulan bir Modal sundu ViewController döndürme ile ilgili bir sorunum var. Tüm bu iOS7 ve daha düşük çalışıyor.iOS8 Modal ViewController Döndürme sorunu
Uygulama Planı:
- RootController (desteklenen Yön: Dikey)
- Modal ViewController Sunan (desteklenen Oryantasyon: Tümü) Ben Cihazı döndürün zaman
My Problem olduğunda Modal Kontrolörü Modal denetleyicinin görünümünün peyzaj manzarası çerçevesine yeniden boyutlandırılmadığı sunulur.
böylece benziyor:
Rotasyon yöntemleri denilen ve el Yatay olarak sağ tarafına (ekran gri tarafı) kullanıcı etkileşimi bakış çerçevesi ayarladığınızda çalışmadı.
RootController kodu:
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
- (NSUInteger) supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
Modal Denetleyici kodu:
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
if (self.presentingViewController != nil) {
[self.presentingViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation
duration:duration];
}
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
if (self.presentingViewController != nil) {
[self.presentingViewController willRotateToInterfaceOrientation:toInterfaceOrientation
duration:duration];
}
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
if (self.presentingViewController != nil) {
[self.presentingViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
}
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
}];
}
herhangi bir iOS8 için bu sorunu çözmek için bana yardımcı olabilir.
Mask'in otomatik kullanıcı arayüzünüzde otomatikleştirilmesini ayarladınız mı? – Jasper