Ho un file .xib e voglio che sia un controller di visualizzazione tabella, ma quando creo un controller di visualizzazione tabella nel file .xib ottengo l'errore Table views with embedded sections and cells are only supported in storyboard documents
. Come posso risolvere questo problema. Di seguito è riportato il mio codice per la visualizzazione della tabella effettiva.Come posso risolvere la configurazione illegale?
self.add = [Play(name: title!), Play(name: artist!), Play(name: album!)]
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.add.count
//return count of objects in array
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = self.tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as! UITableViewCell
var play: Play
play = add[indexPath.row]
cell.textLabel?.text = play.name
return cell
}
Ho una vista del registro e 3 file xib per agire come tre pagine diverse in una vista di scorrimento, ma voglio che quelle pagine siano uitabili. Quale altra soluzione potrei fare? – blee