[iOS开发]分享UIWindow里面的view如何在横屏时候切换位置

来源:互联网 发布:无root应用数据备份 编辑:程序博客网 时间:2024/05/17 01:12

在UIWindow里面先放一个UIViewController, 用Controller的方法:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations.      
     return YES;
}

然后,[self.view.window addSubview:vc.view];


0 0
原创粉丝点击