i have updated my example
but it still does not work
Post
Replies
Boosts
Views
Activity
it only works in iOS 13.6 and below in my case...... iOS 14.2 is not working :-(
i am using a UIViewController, not a UITableViewController
here my complete class:
import UIKit
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self,forCellReuseIdentifier: "TableViewCell")
tableView.dataSource = self
tableView.delegate = self
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 5
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "TableViewCell",for: indexPath)
cell.selectionStyle = UITableViewCell.SelectionStyle.none
//cell.textLabel?.text = self.tableViewData[indexPath.row]
let text = UITextField(frame: CGRect(x: 0, y: 0, width: 300, height: 40))
text.text = "asdfasfasf"
text.delegate = self;
cell.addSubview(text)
return cell
}
}
yes it is,
Interaction true
Interaction true
Interaction true
Interaction true
Interaction true
but i cannot click it
with tab is it possible to reach the content and change it, but no per click/ touch (Simulator/ real iOS iPad with iOS 14.2)
update, i completely reinstalled xcode....
the same behavior...
but i figured out, if i scroll complete all visible rows up, after that i can select the text.....
i am complete helpless... i dont know what i can do
Hi,
i come from the Xamarin world and just tried to find out where the problem is.
if i had something wrong in my code, sorry.
meanwhile, i found the problem. i have to add my controls to the contenview and not to the cell.
this is the solution.
thank you very much and merry christmas
Sven