-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/barcode-scanning/ios/Plugin/Classes/Options/SetZoomRatioOptions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Foundation | ||
import Capacitor | ||
|
||
@objc public class SetZoomRatioOptions: NSObject { | ||
private var zoomRatio: CGFloat | ||
|
||
init(zoomRatio: Float) { | ||
self.zoomRatio = CGFloat(zoomRatio) | ||
} | ||
|
||
func getZoomRatio() -> CGFloat { | ||
return zoomRatio | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/barcode-scanning/ios/Plugin/Classes/Results/GetMaxZoomRatioResult.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Foundation | ||
import Capacitor | ||
|
||
@objc public class GetMaxZoomRatioResult: NSObject, Result { | ||
let zoomRatio: Float | ||
|
||
init(zoomRatio: CGFloat) { | ||
self.zoomRatio = Float(zoomRatio) | ||
} | ||
|
||
public func toJSObject() -> AnyObject { | ||
var result = JSObject() | ||
result["zoomRatio"] = zoomRatio | ||
return result as AnyObject | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/barcode-scanning/ios/Plugin/Classes/Results/GetMinZoomRatioResult.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Foundation | ||
import Capacitor | ||
|
||
@objc public class GetMinZoomRatioResult: NSObject, Result { | ||
let zoomRatio: Float | ||
|
||
init(zoomRatio: CGFloat) { | ||
self.zoomRatio = Float(zoomRatio) | ||
} | ||
|
||
public func toJSObject() -> AnyObject { | ||
var result = JSObject() | ||
result["zoomRatio"] = zoomRatio | ||
return result as AnyObject | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/barcode-scanning/ios/Plugin/Classes/Results/GetZoomRatioResult.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Foundation | ||
import Capacitor | ||
|
||
@objc public class GetZoomRatioResult: NSObject, Result { | ||
let zoomRatio: Float | ||
|
||
init(zoomRatio: CGFloat) { | ||
self.zoomRatio = Float(zoomRatio) | ||
} | ||
|
||
public func toJSObject() -> AnyObject { | ||
var result = JSObject() | ||
result["zoomRatio"] = zoomRatio | ||
return result as AnyObject | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Foundation | ||
import Capacitor | ||
|
||
@objc public protocol Result { | ||
@objc func toJSObject() -> AnyObject | ||
} |