2009-06-22 20 views

cevap

8

görünümünüz kontrolör gönderilecektir: Telefon

rotasyon yapıldıktan sonra

döndürüldüğünde edilirken

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 

şey yapmak için Uygulamak elde edersiniz:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 

Burada docs (bkz. Döndürme Görünüm Döndürmeleri)

http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html

1

Aygıtı döndürdüğünüzde, görünüm denetleyiciniz, eski yönlendirmeyle bir didRotateFromInterfaceOrientation: iletisini alır. Geçerli rotasyonu görmek için interfaceOrientation özelliğini kontrol edebilir ve buna göre bir şeyler yapabilirsiniz.

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 
1

ViewController döndürme işleminden önce gönderilen olayları izlemeniz gerekir. Yani:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 

ve sonrası rotasyon

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 
0

yöntem adları doğru ... ama onlar asla denilen olsun. Buna ne sebep olur? Örnek yöntemini "shouldOutorotateToInterfaceOrientation" yöntemini uygulamanız ve YES'i döndürmeniz gerekir.

1

. ve sonra iki yöntem çağrılacak.

İlgili konular