Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
- {
- var cell: UITableViewCell = UITableViewCell()
- if indexPath.section == 0
- {
- cell = tableView.dequeueReusableCell(withIdentifier: "Cell1", for: indexPath)
- // Do stuff
- }
- else if indexPath.section == 1
- {
- cell = tableView.dequeueReusableCell(withIdentifier: "Cell1", for: indexPath)
- // Do stuff
- }
- else if indexPath.section == 2
- {
- cell = tableView.dequeueReusableCell(withIdentifier: "Cell2", for: indexPath)
- let wornTextField = cell.viewWithTag(3) as! UITextField
- let pickerView: UIPickerView = UIPickerView()
- pickerView.frame.size.height = (view.frame.size.height / 2)
- pickerView.delegate = self
- pickerView.dataSource = self
- wornLabel.text = "Test"
- wornTextField.tintColor = UIColor.clear
- wornTextField.inputView = wearsPickerView
- wornTextField.delegate = self
- }
- else if indexPath.section == 3
- {
- // Dequeue cell
- }
- return cell
- }
- func numberOfComponents(in pickerView: UIPickerView) -> Int
- {
- print("This is called 0")
- return 1
- }
- func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?
- {
- // This is not called, WHY???
- return someArray_ARRAY[row]
- }
- func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
- {
- print("This is called 2")
- }
- func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int
- {
- print("This is called 1")
- return numOfWears_ARRAY.count
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement