Files
2022-12-12 21:35:59 +03:00

44 lines
1.1 KiB
Swift

//
// MainViewInvite.swift
// Wallet
//
// Created by Igor on 29.03.2021.
// Copyright © 2021 AM. All rights reserved.
//
import UIKit
import MarqueeLabel
class MainViewInvite: CommonViewCustom {
@IBOutlet var lockedFundsView: UIView!
@IBOutlet var lockedFundsLabel: MarqueeLabel!
@IBOutlet var heightConstraint: NSLayoutConstraint!
var didClose: (() -> Void)?
var didLockedFunds: (() -> Void)?
@IBAction func onClose(_: AnyObject?) {
didClose?()
self.isHidden = true
}
@IBAction func onQR(_: AnyObject?) {
Popup.show(content: StoryboardScene.Main.invite.instantiate())
}
@IBAction func onLockedFunds(_: AnyObject?) {
didLockedFunds?()
}
func setupVisability(visibleOnController: Bool) {
UIView.animate(withDuration: 0.5) {
DispatchQueue.main.async {
self.isHidden = !visibleOnController
self.alpha = visibleOnController ? 1 : 0
self.heightConstraint.constant = visibleOnController ? 40 : 0
}
}
}
}