Input Text TableView

How to loop thru and extract the Cell.textField.text from tableView;

 

let cells = self.tableView.visibleCells as! Array  ‘Ambiguous

      

//let cells = self.tableView; indexPathsForVisibleRows

      

//let cells = self.tableView(IndexPath)

 

        for cell in cells {

          

            // look at data let indexPath = IndexPath(row: index, section: 0)

            let indexPath = IndexPath(row: index, section: 0)

            guard let cell = tableView.cellForRow(at: indexPath) as? TextFieldCell

                else{

                       //return nil

                    }

            if let text = cell.textField.text, !text.isEmpty {

                print(text)

              

            } // end if

              

        } // end for

Powered by WPeMatico

About

You may also like...

Comments are closed.