ios - Subviews of custom UIView are equal to nil even after view is loaded -
i'm trying render custom view. problem after view loaded, subviews still equals nil.. not showing , impossible configure. custom view setup through interface builder , outlets linked properties can see below.
here custom uiview code :
import uikit class badgeview : uiview { @iboutlet weak var progresscircleview: circleprogressview! @iboutlet weak var progressionvalue: uilabel! @iboutlet weak var name: uilabel! override init(frame: cgrect) { super.init(frame: frame) } required init(coder adecoder: nscoder) { super.init(coder: adecoder) } }
tell me if need more informations.
how initialise badgeview
. if using storyboard or xib, view should initialised this:
let nib = nsbundle.mainbundle().loadnibnamed("badgeview", owner: self, options: nil) let badgeview = nib[0] as! badgeview
Comments
Post a Comment