tôi cần phải gửi thông báo @"willAnimateRotationToInterfaceOrientation"
với các thông số toInterfaceOrientation
và duration
(câu hỏi # 1) cho tất cả UIViewController
về việc áp dụng (câu hỏi # 2). Làm thế nào để viết mã cho điều đó?Làm thế nào để gửi thông báo với các tham số trên Objective-C?
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(willAnimateRotationToInterfaceOrientation:toInterfaceOrientation:duration)
name:@"willAnimateRotationToInterfaceOrientation"
object:nil];
[[NSNotificationCenter defaultCenter]
postNotificationName:@"willAnimateRotationToInterfaceOrientation"
object:self];
Câu hỏi liên quan: http://stackoverflow.com/questions/15957077/event-willanimaterotationtointerfaceorientation-isnt-calling – Dmitry