[ 
https://issues.apache.org/jira/browse/CB-11410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15325810#comment-15325810
 ] 

Yazeed Fares edited comment on CB-11410 at 6/11/16 10:26 AM:
-------------------------------------------------------------

To solve the issue as a short term solution I add a new method to dismiss the 
popover on orientation change and I modified the displayPopover method by 
adding an event listener to it :

At the end of the  displayPopover method I added the following:

    [[NSNotificationCenter defaultCenter] 
       addObserver:self 
          selector:@selector(deviceOrientationDidChangeNotification: ) 
              name:UIDeviceOrientationDidChangeNotification 
            object:nil];

then defined this method

- (void)deviceOrientationDidChangeNotification:(NSNotification*)notification {
    [[self pickerController] dismissViewControllerAnimated:YES completion:nil];
}


was (Author: yazeed.fares):
To solve the issue as a short term solution I add a new method to dismiss the 
popover on orientation change and I modified the displayPopover method by 
adding an event listener to it :

At the end of the  displayPopover method I added the following:

    [[NSNotificationCenter defaultCenter] 
       addObserver:self 
          selector:@selector(deviceOrientationDidChangeNotification:) 
              name:UIDeviceOrientationDidChangeNotification 
            object:nil];

then defined this method

- (void)deviceOrientationDidChangeNotification:(NSNotification*)notification {
    [[self pickerController] dismissViewControllerAnimated:YES completion:nil];
}

> navigator.camera.getPicture returns undefined instead of CameraPopoverHandle 
> object
> -----------------------------------------------------------------------------------
>
>                 Key: CB-11410
>                 URL: https://issues.apache.org/jira/browse/CB-11410
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs, Plugin Camera
>    Affects Versions: Master
>         Environment: iOS
>            Reporter: Yazeed Fares
>
> The camera plugin documentation describes that you can control the camera 
> popover when device orientation changes, I tried the example but is is not 
> working, so I went to the code to see what is happening and noticed that the 
> navigator.camera.getPicture function doesn't return anything because the 
> lines that returns the CameraPopoverHandle object are commented out.
> So I uncommented them to test but the issue is still happening, there is 
> something wrong in the native code.
> My test was on real iPad iOS 9.3.2 and  on iOS simulator with iOS 8.4



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to