Code error: UITableViewCell is isn't convertible to Mirrordisposition

Source: Internet
Author: User

Override Func TableView (Tableview:uitableview, Cellforrowatindexpath indexpath:nsindexpath), UITableViewCell {
Let Cellidentifier = "Cellidentifier"
var B_addcell = (Indexpath.row = = Self.listteams.count)
var cell:uitableviewcell! = Tableview.dequeuereusablecellwithidentifier ("UITableViewCell", Forindexpath:indexpath) as? UITableViewCell

if (cell = = nil) {
Cell = UITableViewCell (Style:UITableViewCellStyle.Default, Reuseidentifier:cellidentifier)}//the error of the above code when executing to this position, By adding to the UITableViewCell above! And as plus? , changing the cell to Var will solve the problem.

if (B_addcell = = False) {
Cell.accessorytype = Uitableviewcellaccessorytype.disclosureindicator
Cell.textlabel?. Text = Self.listteams[indexpath.row] as? String

}else{
Self.txtField.frame = CGRectMake (10, 5, 300, 44)
Self.txtField.borderStyle = Uitextborderstyle.none
Self.txtField.placeholder = "Add ..."
Self.txtField.text = ""
Cell.contentView.addSubview (Self.txtfield)}

Configure the cell ...

return cell
}

Code error: UITableViewCell is isn't convertible to Mirrordisposition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.