Skip to content

Commit

Permalink
fix: implemented a fix for capacitor-community#131 paddingBottom para…
Browse files Browse the repository at this point in the history
…m is not working under iOS
  • Loading branch information
ryaa committed May 8, 2021
1 parent 5c0f696 commit ac63599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public class CameraPreview: CAPPlugin {
}

if UIDevice.current.orientation.isPortrait {
if (self.previewView != nil && self.x != nil && self.y != nil && self.width != nil && self.height != nil) {
self.previewView.frame = CGRect(x: self.x!, y: self.y!, width: self.width!, height: self.height!)
if (self.previewView != nil && self.x != nil && self.y != nil && self.width != nil && height != nil) {
self.previewView.frame = CGRect(x: self.x!, y: self.y!, width: self.width!, height: height!)
}
self.cameraController.previewLayer?.frame = self.previewView.frame
}
Expand Down

0 comments on commit ac63599

Please sign in to comment.