Note that there are some explanatory texts on larger screens.

plurals
  1. POHow remove the gap from screen?
    primarykey
    data
    text
    <p>I have an application in which I have apply facility to change orientation of view but when I change the orientation then go to next screen then there show a gap on right side if I rotate device in right side as show in image: <img src="https://i.stack.imgur.com/mQYzx.png" alt="enter image description here"></p> <p>I use this code in viewcontroller.m:</p> <pre><code>-(void) viewWillAppear:(BOOL)animated{ UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation]; [self willAnimateRotationToInterfaceOrientation:orientation duration:0]; } -(void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { if(toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ) { lgo_imag.frame=CGRectMake(0, 0, 320, 44); btn_settings.frame=CGRectMake(238, 3, 72, 37); btn_alarm_activity.frame=CGRectMake(125, 10, 70, 85); btn_alarm_screen.frame=CGRectMake(48, 210, 225, 55); btn_routine_screen.frame=CGRectMake(48, 275, 225, 55); btn_view_info.frame=CGRectMake(48, 340, 225, 55); lable_alarm_value.frame=CGRectMake(25, 100, 270, 81); scroll_view.frame=CGRectMake(0, 44, 320, 416); scroll_view.contentSize=CGSizeMake(320 ,416); } else if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight ) { lgo_imag.frame=CGRectMake(0, 0, 480, 44); btn_settings.frame=CGRectMake(398, 3, 72, 37); btn_alarm_activity.frame=CGRectMake(205, 10, 70, 85); btn_alarm_screen.frame=CGRectMake(128, 210, 225, 55); btn_routine_screen.frame=CGRectMake(128, 275, 225, 55); btn_view_info.frame=CGRectMake(128, 340, 225, 55); lable_alarm_value.frame=CGRectMake(125, 100, 270, 81); scroll_view.frame=CGRectMake(0, 44, 480, 320); scroll_view.contentSize=CGSizeMake(480 ,470); } } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Overriden to allow any orientation. return YES; } </code></pre> <p>How fix that problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload