我有一个用以下方式初始化的视图 -(id)initWithCoder:(NSCoder *)aDecoder
如何在 中初始化此视图viewController?
我想viewController如果我想autoRotate使用设备查看视图,我需要。我不确定,也许我可以在autoRotation没有viewController?
向视图添加观察者shouldAutorotateToInterfaceOrientation:并不会自动旋转视图。但是当我也添加
-(void) orientationChanged:(NSNotification *) notification
{
NSLog(@"orientationChanged: %d", [[notification object] orientation]);
}
我在控制台窗口中获得了方向值。
任何帮助将不胜感激。