ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, JobsListView { … func render(uiState: UiState) { if(uiState is UiState.Success){ let state = uiState as! UiState.Success displayJobList(jobs: state.data as! [JobPosition]) } if(uiState is UiState.Loading){ displayProgress() } if(uiState is UiState.Error){ let state = uiState as! UiState.Error displayError(error: state.throwable as! KotlinThrowable) } } … }