skip to Main Content

Xcode – Swift tableviewcell height stays fixed

My tableviewcell height stays fixed even though I do the following: tableView.rowHeight = UITableView.automaticDimension tableView.estimatedRowHeight = 150 I have one imageview and one label inside the cell and I gave constraints to each side. Also, I tried: func tableView(_ tableView:…

VIEW QUESTION

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