Fix: typos in variable/func name

pull/727/head
Hwee-Boon Yar 6 years ago
parent d459f4019b
commit b52d35c4b2
  1. 20
      AlphaWallet/Transactions/ViewControllers/TransactionsViewController.swift

@ -164,21 +164,21 @@ class TransactionsViewController: UIViewController {
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
fileprivate func hederView(for section: Int) -> UIView { fileprivate func headerView(for section: Int) -> UIView {
let conteiner = UIView() let container = UIView()
conteiner.backgroundColor = viewModel.headerBackgroundColor container.backgroundColor = viewModel.headerBackgroundColor
let title = UILabel() let title = UILabel()
title.text = viewModel.titleForHeader(in: section) title.text = viewModel.titleForHeader(in: section)
title.sizeToFit() title.sizeToFit()
title.textColor = viewModel.headerTitleTextColor title.textColor = viewModel.headerTitleTextColor
title.font = viewModel.headerTitleFont title.font = viewModel.headerTitleFont
conteiner.addSubview(title) container.addSubview(title)
title.translatesAutoresizingMaskIntoConstraints = false title.translatesAutoresizingMaskIntoConstraints = false
let horConstraint = NSLayoutConstraint(item: title, attribute: .centerX, relatedBy: .equal, toItem: conteiner, attribute: .centerX, multiplier: 1.0, constant: 0.0) let horConstraint = NSLayoutConstraint(item: title, attribute: .centerX, relatedBy: .equal, toItem: container, attribute: .centerX, multiplier: 1.0, constant: 0.0)
let verConstraint = NSLayoutConstraint(item: title, attribute: .centerY, relatedBy: .equal, toItem: conteiner, attribute: .centerY, multiplier: 1.0, constant: 0.0) let verConstraint = NSLayoutConstraint(item: title, attribute: .centerY, relatedBy: .equal, toItem: container, attribute: .centerY, multiplier: 1.0, constant: 0.0)
let leftConstraint = NSLayoutConstraint(item: title, attribute: .left, relatedBy: .equal, toItem: conteiner, attribute: .left, multiplier: 1.0, constant: 20.0) let leftConstraint = NSLayoutConstraint(item: title, attribute: .left, relatedBy: .equal, toItem: container, attribute: .left, multiplier: 1.0, constant: 20.0)
conteiner.addConstraints([horConstraint, verConstraint, leftConstraint]) container.addConstraints([horConstraint, verConstraint, leftConstraint])
return conteiner return container
} }
private func reflectActionButtonsVisibility() { private func reflectActionButtonsVisibility() {
@ -244,7 +244,7 @@ extension TransactionsViewController: UITableViewDataSource {
return viewModel.numberOfItems(for: section) return viewModel.numberOfItems(for: section)
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return hederView(for: section) return headerView(for: section)
} }
func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) { func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
} }

Loading…
Cancel
Save