我需要创建一个观察者,只要UIViewcontroller被更改就会调用它 如何在委托或单个方法中使用它来观察UIViewcontroller更改中的完整层次结构更改?
[[NSNotificationCenter defaultCenter] addObserver:self // put here the view controller which has to be notified
selector:@selector(viewcontrollerChanged:)
name:@"UIDeviceOrientationDidChangeNotification"
object:nil];