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.
精彩评论