ios - UITableView and UITableViewCell from XIB bug? -
After
I'am How I'am Loading UITableView and Cell And this is my custom view cell I can not post images but I end up with my cells with each other .. And weird artworks also work similarly to sample and situation very similar Download someone's code with add addition to UITableView with
UITableViewCell Trying> .xib Programmatically but I do not know what I'm doing wrong I've read some tutorials and it seems that I'm doing everything right, but it does not work. People can help me
Import Foundation Import UIKit Class GamesViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {var GameTableView: UITableView? ; Override funk viewDidload () {gameTableView = UITableView (frame: self.view.frame, style: UITableViewStyle.Plain); GameTableView !. Delegate = self; GameTableView! .dataSource = self; GameTableView! Var nib = UINib (nickname: "Taskellview", bundle: zero); GameTableView !. RegiststerNib (nib, forCellReuseIdentifier: "cell"); Self.view.addSubview (gameTableView); Super.viewDidLoad (); } Override funk received Rasiv Memorial Warning () {Super DID Rescue Memory Warning (); } Festival tableView (tableView: UITableView!, DidSelectRowAtIndexPath indexPath: NSIndexPath!) {} Festival tableView (tableView: UITableView!, NumberOfRowsInSection section: int) - & gt; Int {Return 4} Fan Table View (Tableview: UITABLE WEVE !, SALFARROAUTENDAPEP INDEXPath: NSINDPax!) - & gt; UITableViewCell! {Cell = table view. As DEEQUEReusableCellWithIdentifier ("cell")? TaskCell; Cell!. TaskSkillLabel.text = "sdfsdf"; Return cell; }}
Import Foundation Import UIKit Class TaskCell: UITableViewCell {@IBOptlet on taskSkillLabel: UILabel; Init (style: UITableViewCellStyle, reuseIdentifier: string) {super.init (style: UITableViewCellStyle.Default, reuseIdentifier: reuseIdentifier); }}
function table view (table view: UITableView !, HeightForrendindapap Index: NSIndexPath!) - & gt; CGFloat {return ATLEAST_YOUR_CELL_HIGHT}
Comments
Post a Comment