开发者

Landescape view always in one view

开发者 https://www.devze.com 2023-01-19 03:22 出处:网络
my app r开发者_JAVA百科un in landscape mode i want it to be always in one form i.e suppose the background is stackoverflow picture in this case stack will be beside the ear speaker and flow beside hom

my app r开发者_JAVA百科un in landscape mode i want it to be always in one form i.e suppose the background is stackoverflow picture in this case stack will be beside the ear speaker and flow beside home button i want when the user rotate the iphone 180 degree (still landscape mode) now flow will be beside the ear speaker and stack beside home button NB: i need all the view rotate not only the background

thanks


Override

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

in your view controller and return YES for any orientation you want to support.

eg:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
            (interfaceOrientation == UIInterfaceOrientationLandscapeRight))
}

that will return YES for all orientations except upside down.

0

精彩评论

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

关注公众号