ios - Constructor not working in swift -


i'm trying create custom checkbox simple title. checkbox have constructor, when call it, title doesn't appear. how should call constructor correctly?

custom checkbox: https://github.com/marxon13/m13checkbox

import uikit    class todotableviewcell: uitableviewcell { override func awakefromnib() {     super.awakefromnib()     // initialization code     //checkbox.titlelabel.text = "asd"     self.checkbox = m13checkbox(title: "zcxc")  }  @iboutlet weak var checkbox: m13checkbox!    override func setselected(selected: bool, animated: bool) {     super.setselected(selected, animated: animated)      // configure view selected state }  } 

i not using m13checkbox myself, can't intended usage pattern. when load ui xib, checkbox should instantiated. here, replace it.

instead, set correct class in interface builder element , configure properties needed. also, keep in mind code not add checkbox @ view hierarchy, nor layout constraints.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -