* Fix layout issue connected with logs.

* Fix for transaction section view. Add ui fix for ios version 10.
pull/2/head
Oleg Gordiichuk 7 years ago committed by Michael Scoff
parent e48a26d894
commit 1b6d282404
  1. 10
      Trust/Transactions/ViewControllers/TransactionsViewController.swift
  2. 1
      Trust/Transactions/Views/TransactionViewCell.swift

@ -143,8 +143,6 @@ class TransactionsViewController: UIViewController {
fileprivate func hederView(for section: Int) -> UIView {
let conteiner = UIView()
conteiner.backgroundColor = viewModel.headerBackgroundColor
conteiner.layer.addBorder(edge: .top, color: viewModel.headerBorderColor, thickness: 0.5)
conteiner.layer.addBorder(edge: .bottom, color: viewModel.headerBorderColor, thickness: 0.5)
let title = UILabel()
title.text = viewModel.titleForHeader(in: section)
title.sizeToFit()
@ -214,4 +212,12 @@ extension TransactionsViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return hederView(for: section)
}
func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
view.layer.addBorder(edge: .top, color: viewModel.headerBorderColor, thickness: 0.5)
view.layer.addBorder(edge: .bottom, color: viewModel.headerBorderColor, thickness: 0.5)
}
//Method heightForHeaderInSection is required for iOS 10.
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 30
}
}

@ -28,6 +28,7 @@ class TransactionViewCell: UITableViewCell {
let leftStackView = UIStackView(arrangedSubviews: [titleLabel, subTitleLabel])
leftStackView.translatesAutoresizingMaskIntoConstraints = false
leftStackView.axis = .vertical
leftStackView.distribution = .fillProportionally
leftStackView.spacing = 6
let rightStackView = UIStackView(arrangedSubviews: [amountLabel])

Loading…
Cancel
Save