Java iOS上的LibGDX:使用Robovm以编程方式旋转屏幕
我有一个我在标题中提到的问题 根据这一点,它会在ViewController中的ViewDid中出现。 但是如何将这段代码导入java,如果我想在游戏结束后改变轮换,在哪里调用它。 我试着这样做:Java iOS上的LibGDX:使用Robovm以编程方式旋转屏幕,java,ios,libgdx,robovm,Java,Ios,Libgdx,Robovm,我有一个我在标题中提到的问题 根据这一点,它会在ViewController中的ViewDid中出现。 但是如何将这段代码导入java,如果我想在游戏结束后改变轮换,在哪里调用它。 我试着这样做: long landscapeOrientation = UIInterfaceOrientation.LandscapeLeft.value(); UIDevice.getCurrentDevice().getKeyValueCoder().setValue("orientation", landsc
long landscapeOrientation = UIInterfaceOrientation.LandscapeLeft.value();
UIDevice.getCurrentDevice().getKeyValueCoder().setValue("orientation", landscapeOrientation);
因为我需要一个对象,所以卡住了 感谢来自中国的Demyan Kimitsa
感谢来自美国的Demyan Kimitsa
long landscapeOrientation = UIInterfaceOrientation.LandscapeLeft.value();
UIDevice.getCurrentDevice().getKeyValueCoder().setValue("orientation", NSNumber.valueOf((int) landscapeOrientation));