ios - Custom UIButton subclass not displaying title -
let me start off saying aware asked question, can't seem find same scenario/problem me. i writing music application, , came ui liked. required button special functionality (past can achieved custom button type) decided make uibutton subclass. used following code in subclass: required init(coder adecoder: nscoder) { self.activestate = false self.activeaccidental = uiimageview() super.init(coder: adecoder) self.layer.bordercolor = uicolor(white:221/255, alpha: 1.0).cgcolor self.layer.borderwidth = 2.0 self.backgroundcolor = uicolor.blackcolor() self.settitlecolor(uicolor.whitecolor(), forstate: .normal) self.settitle("hello", forstate: .normal) } override func layoutsubviews() { println(self.frame.origin.x) self.activeaccidental = uiimageview(frame: cgrectmake(self.bounds.origin.x, self.bounds.origin.y, 20, 20)) self.activeaccidental.image = uiimage(named: "bmicalcicon.png") self.addsubview(activeaccidental...