Skip to content

Commit

Permalink
improvement: open ios camera in topmost frame
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-xrex committed Jan 25, 2021
1 parent fb3ba41 commit 4acdba8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/camera.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ export let takePicture = function (options): Promise<any> {
let frame: typeof frameModule = require("tns-core-modules/ui/frame");

let topMostFrame = frame.topmost();
while (topMostFrame.parent) {
topMostFrame = topMostFrame.parent as any;
}
if (topMostFrame) {
let viewController: UIViewController = topMostFrame.currentPage && topMostFrame.currentPage.ios;
if (viewController) {
Expand Down

0 comments on commit 4acdba8

Please sign in to comment.