Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-04-29 12:31:28 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9a72486e1926e7fb331af774facb4108e12d893e
9a72486e
1 parent
04d9cdfe
barcode commented
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponBarcodeView.swift
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
9a72486
No preview for this file type
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponBarcodeView.swift
View file @
9a72486
...
...
@@ -10,8 +10,9 @@ import SwiftUI
import
Combine
import
Foundation
import
UIKit
import
RSBarcodes_Swift
import
AVFoundation
// TODO: Uncomment for barcode
//import RSBarcodes_Swift
//import AVFoundation
...
...
@@ -196,18 +197,19 @@ extension CouponBarcodeView {
// let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue)
if
let
barcodeImage
=
RSUnifiedCodeGenerator
.
shared
.
generateCode
(
barcodeString
,
machineReadableCodeObjectType
:
AVMetadataObject
.
ObjectType
.
ean13
.
rawValue
,
targetSize
:
CGSize
(
width
:
self
.
uiscreen
.
width
*
0.8
,
height
:
self
.
uiscreen
.
height
*
0.1
))
{
// TODO: Uncomment for barcode
// if let barcodeImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) {
//
VStack
(
alignment
:
.
center
)
{
Image
(
uiImage
:
barcodeImage
)
.
resizable
()
.
aspectRatio
(
contentMode
:
.
fit
)
.
frame
(
width
:
self
.
uiscreen
.
width
*
0.8
,
height
:
self
.
uiscreen
.
height
*
0.1
)
}
.
frame
(
maxWidth
:
.
infinity
)
.
padding
(
.
top
,
self
.
uiscreen
.
height
*
0.01
)
}
////
// VStack(alignment: .center) {
// Image(uiImage: barcodeImage)
// .resizable()
// .aspectRatio(contentMode: .fit)
// .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)
// }
// .frame(maxWidth: .infinity)
// .padding(.top, self.uiscreen.height * 0.01)
// }
Text
(
barcodeString
)
...
...
Please
register
or
login
to post a comment