So laden Sie Benutzerdefinierte Zelle (Xib) in UITableview mit Swift

Hier ist mein code

func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int 
{
    return 10   
}

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
    var cell :UITableViewCell = tableView.dequeueReusableCellWithIdentifier("discovered") as UITableViewCell!

    bluetoothlog.registerNib(UINib(nibName: "devicedet", bundle: nil), forCellReuseIdentifier: "discovered")
    //NSBundle.mainBundle().loadNibNamed("devicedet", owner: nil, options: nil)[0] as UITableViewCell

    cell = blucell
    devname.text = peri[indexPath.row]
    devstrength.text = signalstrength[indexPath.row]

    bluetoothlog.backgroundColor = UIColor.clearColor()
    return cell        
}

Habe ich versucht mit dem obigen code und nichts wird angezeigt, in Tableview, bitte helfen Sie mir, dies zu ändern-code arbeiten

Dank

  • Bitte formatieren Sie Ihre code ist es schwer zu Lesen Geldautomaten!
  • sicher, ich werde tun,
InformationsquelleAutor vijeesh | 2015-02-10
Schreibe einen Kommentar