开发者

Windows based iPad application orientation

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜