Moving navbar button in TicketsViewController

pull/37/head
Oguzhan Gungor 7 years ago
parent f8f0c7c2b3
commit ad99badf27
  1. 2
      Trust/Redeem/ViewControllers/RedeemTickets.storyboard
  2. 27
      Trust/Tokens/ViewControllers/TicketsViewController.swift

@ -39,7 +39,7 @@
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="ReeemTicketCell" rowHeight="90" id="x30-SZ-UO2" customClass="RedeemTicketTableViewCell" customModule="Trust" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="RedeemTicketCell" rowHeight="90" id="x30-SZ-UO2" customClass="RedeemTicketTableViewCell" customModule="Trust" customModuleProvider="target">
<rect key="frame" x="0.0" y="58" width="375" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="x30-SZ-UO2" id="0T6-c0-w1v">

@ -27,24 +27,39 @@ class TicketsViewController: UIViewController {
var session: WalletSession!
weak var delegate: TicketsViewControllerDelegate?
override func viewWillAppear(_ animated: Bool) {
override
func viewDidLoad() {
super.viewDidLoad()
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel,
target: self,
action: #selector(didTapCancelButton))
}
override
func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.applyTintAdjustment()
title = viewModel.title
}
@IBAction func didTapDoneButton(_ sender: UIBarButtonItem) {
@IBAction
func didTapCancelButton(_ sender: UIBarButtonItem) {
delegate?.didCancel(in: self)
}
@IBAction func didPressRedeem(_ sender: UIButton) {
delegate?.didPressRedeem(token: viewModel.token, in: self)
@IBAction
func didPressRedeem(_ sender: UIButton) {
delegate?.didPressRedeem(token: viewModel.token,
in: self)
}
@IBAction func didPressSell(_ sender: UIButton) {
@IBAction
func didPressSell(_ sender: UIButton) {
delegate?.didPressSell(token: viewModel.token, in: self)
}
@IBAction func didPressTransfer(_ sender: UIButton) {
@IBAction
func didPressTransfer(_ sender: UIButton) {
delegate?.didPressTransfer(for: .send(type: .stormBird(viewModel.token)),
ticketHolders: viewModel.ticketHolders!,
in: self)

Loading…
Cancel
Save