iOS MVVM My Concept#1

under iOS13

class viewModel: {    var reloadCount: Int = 0    //ViewModel send to View   => react the event
var reloadCollectionView: ( ()->() )?

//View call ViewModel => user touch the Buttom (event)
func onTapCellButton() {
//changeDataFirst
reloadCount += 1 self. reloadCollectionView?()
}
}

--

--

Major in physical education. Football referee. And high interest in looking the world through the numbers.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mario tsai

Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.