Created
July 29, 2018 17:34
-
-
Save croossin/0f6ea52beaab747ca4f7385ac7336b1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OverviewMintsightCardPartController: CardPartsViewController, MintsightTypeProtocol, NoTopBottomMarginsCardTrait { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
var cardParts: [CardPartView] = [] | |
let title = CardPartTextView(type: .title) | |
viewModel.title.asObservable().bind(to: title.rx.text).disposed(by: bag) // This is where we are binding to the viewModel | |
title.textColor = brightFontColor | |
title.font = UIFont.mintGenericFontBlack(.large22) | |
title.textAlignment = .center | |
cardParts.append(title) | |
let description = CardPartTextView(type: .detail) | |
viewModel.description.asObservable().bind(to: description.rx.text).disposed(by: bag) // This is where we are binding to the viewModel | |
description.textColor = brightFontColor | |
description.font = UIFont.mintGenericFontSemibold(.normal) | |
description.textAlignment = .center | |
cardParts.append(description) | |
// ... and so on | |
setupCardParts(cardParts, forState: .hasData) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment