Manos Chorianopoulos

Hide Barcode Section

......@@ -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
......