// // HomeCellModel.swift // GMERemittance // // Created by FMI-12 on 3/19/18. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation import UIKit class HomeCellModel { let totalItem: CGFloat = 2 let column: CGFloat = 2 let minLineSpacing: CGFloat = 5.0 let minItemSpacing: CGFloat = 5.0 let offset: CGFloat = 5.0 // TODO: for each side, define its offset let numCollectionItem: CGFloat = 4.0 var clicked: Bool = false func getItemWidth(boundWidth: CGFloat) -> CGFloat { // totalCellWidth = (collectionview width or tableview width) - (left offset + right offset) - (total space x space width) let totalWidth = boundWidth - (offset + offset) - ((column - 1) * minItemSpacing) return totalWidth / column } func getCountforCollection() -> CGFloat { return numCollectionItem } func getClicked() -> Bool { return clicked } func setClicked(click: Bool) { clicked = click } }