objective c - iOS force landscape but not all contents are displayed -


i trying work on ios app , 1 viewcontroller portrait , 1 viewcontroller using googlemap landscape orientation follows :

enter image description here

when comes implementation , testing, shows : enter image description here

i not sure how when running on iphone 6 ios 8.3 . seems setting device orientation , interface orientation different parameters have set. have

appdelegate.m

-(nsuinteger)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window{      return uiinterfaceorientationmaskallbutupsidedown;  } 

viewcontrollera.m

-(void) viewdidappear:(bool)animated {     [super viewdidappear:animated];      nsnumber *value = [nsnumber numberwithint:uiinterfaceorientationportrait];     [[uidevice currentdevice] setvalue:value forkey:@"orientation"];   } 

viewcontrollerb.m

-(void) viewdidappear:(bool)animated {       [super viewdidappear:animated];       ispresented = yes;          nsnumber *value = [nsnumber numberwithint:uiinterfaceorientationlandscaperight];        [[uidevice currentdevice] setvalue:value forkey:@"orientation"];         [[uiapplication sharedapplication] setstatusbarorientation:   uiinterfaceorientationlandscaperight];   }   viewdidload ...    gmsmarker *marker = [[gmsmarker alloc] init];     nslog(@"assadsd arrived map");     if(latitide!=0.00&&longitude!=0.00) {         cllocationcoordinate2d position = cllocationcoordinate2dmake(latitide, longitude);         marker.position = cllocationcoordinate2dmake(position.latitude, position.longitude);         camera = [gmscameraposition camerawithlatitude:latitide  longitude:longitude  zoom:12];     }else{         camera = [gmscameraposition camerawithlatitude:22.2855200   longitude:114.1576900  zoom:12];         marker.position = cllocationcoordinate2dmake(22.2855200, 114.1576900);     }       self.mymapview = [gmsmapview mapwithframe:self.view.bounds camera:camera]; 

could please tell me know-how work first picture ? seems ios 8.3 has orientation bug has re-=assign correct view width , height not sure how work.

if using navigationcontroller create navigationcontroller subclass , override shouldautorotate method.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -