Skip to content

Instantly share code, notes, and snippets.

class OverviewMintsightViewModel {
var type = Variable<MintsightType>(.unknown)
var thumbnailImage: Variable<UIImage?> = Variable(nil)
var title = Variable<String>("")
var description = Variable<String>("")
var state:Variable<CardState> = Variable<CardState>(.hasData)
init() { ... }
}
realmNotification = MMProvidersRealm.allProviders().addNotificationBlock({[weak self] (results, change, error) in
guard let this = self, let providers = results as? [MMProvidersRealm], error == nil else { return }
// Apply some logic on providers
this.title.value = computedTitle
this.description.value = computedDescription
this.state.value = .hasData
})
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
@croossin
croossin / .gitlab-ci.yml
Created February 26, 2019 15:51
GitLab CD for Vue.js app to AWS S3
stages:
- build
- deploy
build prod:
image: node:10.15.0-stretch
stage: build
only:
- tags
script: