skip to Main Content

Xcode – How to avoid force casting (as!) in Swift

extension ActionSheetViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return sheetActions.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: TableCellIds.ActionSheet.actionSheetTableCellIdentifier, for: indexPath) as! ActionsSheetCell cell.actionCellLabel.text = "My cell…

VIEW QUESTION
Back To Top
Search