开发者

Windows based iPad application orientation

开发者 https://www.devze.com 2023-03-23 17:47 出处:网络
I want to create iPad windows based application which support orientation by defau开发者_开发技巧lt windows application is not supporting orientation how to enable orientation support in windows based

I want to create iPad windows based application which support orientation by defau开发者_开发技巧lt windows application is not supporting orientation how to enable orientation support in windows based application in iPad.

Thank you


The window has no rotation functionality. It is allays in portrait mode. If you want something to rotate with the device, you should use UIViewController. It has to implement the method shouldAutorotateToInterfaceOrientation and return true for your orientations or remove it for all orientations.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

You should also change it in the project settings (ProjectName-Info.plist).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号