An advanced Ethereum/EVM mobile wallet
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
alpha-wallet-ios/Trust/Redeem/ViewModels/RedeemTicketsViewModel.swift

49 lines
1.0 KiB

//
// RedeemTicketsViewModel.swift
// Alpha-Wallet
//
// Created by Oguzhan Gungor on 3/4/18.
// Copyright © 2018 Alpha-Wallet. All rights reserved.
//
import Foundation
import UIKit
struct RedeemTicketsViewModel {
var token: TokenObject
var ticketHolders: [TicketHolder]?
init(token: TokenObject) {
self.token = token
self.ticketHolders = TicketAdaptor.getTicketHolders(for: token)
}
func item(for indexPath: IndexPath) -> TicketHolder {
return ticketHolders![indexPath.row]
}
func numberOfItems(for section: Int) -> Int {
return ticketHolders!.count
}
func height(for section: Int) -> CGFloat {
return 90
}
var title: String {
return R.string.localizable.aWalletTicketTokenRedeemSelectTicketsTitle ()
}
var buttonTitleColor: UIColor {
return Colors.appWhite
}
var buttonBackgroundColor: UIColor {
return Colors.appHighlightGreen
}
var buttonFont: UIFont {
return Fonts.regular(size: 20)!
}
}