criando células personalizadas de tableview rapidamente
Eu tenho uma classe de célula personalizada com um par de IBOutlets. Eu adicionei a classe ao storyboard. Conectei todas as minhas tomadas. minha função cellForRowAtIndexPath se parece com isso:
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as SwipeableCell
cell.mainTextLabel.text = self.venueService.mainCategoriesArray()[indexPath.row]
return cell
}
Aqui está minha classe de célula personalizada:
class SwipeableCell: UITableViewCell {
@IBOutlet var option1: UIButton
@IBOutlet var option2: UIButton
@IBOutlet var topLayerView : UIView
@IBOutlet var mainTextLabel : UILabel
@IBOutlet var categoryIcon : UIImageView
init(style: UITableViewCellStyle, reuseIdentifier: String!) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
}
Quando executo o aplicativo, todo o meu celular está vazio. Eu desconecteiself.venueService.mainCategoriesArray()
e contém todas as seqüências corretas. Eu também tentei colocar uma string real igual ao rótulo, e isso produz o mesmo resultado.
o que estou perdendo? Qualquer ajuda é apreciada.