开发者

Landescape view always in one view

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜