开发者

Setting View controls according to the Orientation

开发者 https://www.devze.com 2023-03-05 06:32 出处:网络
i created a view based application. All UI control\'s i cr开发者_Go百科eatedthorough code.But view changing according to the Orientation.can i have any properties to avoid this problemEnable the follo

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

精彩评论

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