swift - Dequeueing TableViewCells from Storyboard Prototype cells? -
i have defined tableview in code within main viewcontroller class. have added main view , defined custom tableviewcell in swift file. have setup basic app displaying datasource information in single textlabel comes default subclassed uitableviewcell
. however, want design more complicated ui in interface builder. viewcontroller defined in main storyboard. how sync pre-existing tableviewcell prototype cell
view element in storyboard? filling in cell identifier , custom class class, calling dequeuereusablecellwithidentifier
identifier , casting result custom type not seem give me cell properties loaded in storyboard.
can show code using?
it should like:
func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier("reuseidentifier", forindexpath: indexpath) as! customcell return cell }
Comments
Post a Comment