skip to Main Content

After tableView scrolled data puts in cells in wrong order – Ios swift

in my View: func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "TransactionTableCell", for: indexPath) as! TransactionTableCell let newItem = getTransactionsInSection(section: sectionHeader[indexPath.section])[indexPath.row] cell.configure(item: newItem) } in my TransactionTableCell func configure(item: TransactionModel) { guard let withdrawalBonuses…

VIEW QUESTION

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