ios - ImagePickerController should open in landscape mode -


uiimagepickercontroller should open in landscape? tried using category not working. how fix orientation uiimagepickercontroller ?

you should use uipopovercontroller display imagepickercontroller in landscape mode

-(void)showimagepicker:(id)sender     {         uibutton *button = (uibutton *)sender; // button on user tap show image picker         uiimagepickercontroller *imgpicker = [[uiimagepickercontroller alloc] init];         imgpicker.delegate = self;         imgpicker.allowsediting = yes;         imgpicker.sourcetype = uiimagepickercontrollersourcetypephotolibrary;          self.popover = [[uipopovercontroller alloc] initwithcontentviewcontroller:imgpicker];         [self.popover presentpopoverfromrect:button.frame inview:self.view permittedarrowdirections:uipopoverarrowdirectionany animated:yes];     } 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -