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-10-19 14:05:24 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0e23de6eb662dd41b9a997f1c3582fe7a62b52cd
0e23de6e
1 parent
9736b70f
Hide Barcode Section
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
18 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0e23de6
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
View file @
0e23de6
...
...
@@ -106,23 +106,43 @@ import AVFoundation
let
barcodeString
=
constructBarcode
()
??
""
barcodeLabel
.
text
=
barcodeString
if
let
barcodeUIImage
=
RSUnifiedCodeGenerator
.
shared
.
generateCode
(
barcodeString
,
machineReadableCodeObjectType
:
AVMetadataObject
.
ObjectType
.
ean13
.
rawValue
,
targetSize
:
CGSize
(
width
:
self
.
uiscreen
.
width
*
0.8
,
height
:
self
.
uiscreen
.
height
*
0.1
))
{
barcodeImage
.
image
=
barcodeUIImage
barcodeImageHeight
.
constant
=
self
.
uiscreen
.
height
*
0.1
showBarcodeButton
.
isHidden
=
false
showBarcodeButtonHeight
.
constant
=
50
showBarcodeButtonTopSpace
.
constant
=
10
}
else
{
barcodeImageHeight
.
constant
=
0
showBarcodeButton
.
isHidden
=
true
showBarcodeButtonHeight
.
constant
=
0
showBarcodeButtonTopSpace
.
constant
=
0
}
// Uncomment if Barcode Section is active again
// if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) {
// barcodeImage.image = barcodeUIImage
//
// barcodeImageHeight.constant = self.uiscreen.height * 0.1
//
// showBarcodeButton.isHidden = false
// showBarcodeButtonHeight.constant = 50
// showBarcodeButtonTopSpace.constant = 10
//
// } else {
// barcodeImageHeight.constant = 0
//
// showBarcodeButton.isHidden = true
// showBarcodeButtonHeight.constant = 0
// showBarcodeButtonTopSpace.constant = 0
// }
// === Hide Barcode Section
barcodeImage
.
isHidden
=
true
barcodeImageHeight
.
constant
=
CGFloat
(
0
)
barcodeLabel
.
isHidden
=
true
barcodeLabelHeight
.
constant
=
CGFloat
(
0
)
borderViewHeight
.
constant
=
CGFloat
(
0
)
borderView2Height
.
constant
=
CGFloat
(
0
)
border1TopSpace
.
constant
=
CGFloat
(
0
)
// 20
barcodeImageTopSpace
.
constant
=
CGFloat
(
0
)
// 10
barcodeLabelTopSpace
.
constant
=
CGFloat
(
0
)
// 10
border2TopSpace
.
constant
=
CGFloat
(
0
)
// 15
showBarcodeButton
.
isHidden
=
true
showBarcodeButtonHeight
.
constant
=
0
showBarcodeButtonTopSpace
.
constant
=
0
// ===
showBarcodeButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
16
)
showBarcodeButton
.
setTitle
(
"Εμφάνιση barcode"
,
for
:
.
normal
)
...
...
@@ -225,7 +245,8 @@ import AVFoundation
termsTextView
.
textAlignment
=
.
center
termsTextView
.
isScrollEnabled
=
false
toggleTerms
()
// Uncomment if Barcode Section is active again
// toggleTerms()
toggleBarcode
()
// Logs
...
...
Please
register
or
login
to post a comment