SORU
5 HAZİRAN 2014, PERŞEMBE


Döndürme yöntemleri, 'didRotateFromİnterfaceOrientation eşdeğer itiraz'?

İOS 8 (diğer tüm döndürme yöntemleri kaldırılmıştır) getirilmiştir viewWillTransitionToSize yeni bir yöntem uygulamaya çalışıyorum. Bilmek istiyorum ne eşdeğer didRotateFromInterfaceOrientation Şimdi olduğu gibi bir dizi temizlik görevleri gerçekleştirmek için ihtiyacımız var ve ben göremiyorum engellemek için elimizden gelen atamak için UIViewControllerTransitionCoordinator sipariş için aradığında 'geçiş' için yeni bir boyut bitirir. Teşekkürler.

CEVAP
5 HAZİRAN 2014, PERŞEMBE


Tamam buldum, az önce geçti animateAlongsideTransition:completion: yöntemi kullanmak zorunda UIViewControllerTransitionCoordinator.

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{   
    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context)
    {
        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
        // do whatever
    } completion:^(id<UIViewControllerTransitionCoordinatorContext> context)
    { 

    }];

    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • 3biblecom

    3biblecom

    23 NİSAN 2011
  • Motor Trend Channel

    Motor Trend

    11 Mart 2006
  • Drakinen

    Drakinen

    1 EYLÜL 2008