开发者

Setting View controls according to the Orientation

i created a view based application. All UI control's i cr开发者_Go百科eated thorough code.But view changing according to the Orientation.can i have any properties to avoid this problem


Enable the following function on your FILENAMEviewcontrol.m of your project.

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

Change UIInterfaceOrientationPortrait according to your orientation

if you have deleted all the commented tags, then add this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜