ios - How to use a custom UIView multiple times in a controller with different content? -
i have created own custom uiview popover have display on screen. uiview looks this: class helptipspopover: uiview { weak var title: uilabel! weak var mytext: uilabel! override init(frame: cgrect) { super.init(frame: frame) let strongtitle = uilabel() title = strongtitle let strongmytext = uilabel() mytext = strongmytext self.addsubview(strongtitle) title.translatesautoresizingmaskintoconstraints = false if selected == true{ title.text = "search" title.font = uifont(name: "helveticaneue-bold", size: 12) title.textcolor = uicolor.trlmblueblackcolor() let leftconstraint = nslayoutconstraint(item: title, attribute: .leading, relatedby: .equal, toitem: self, attribute: .leading, multiplier: 1.0, constant: 10) let topconstraint = nslayoutconstraint(item: title, attribute: .top, relatedby: .equal, toitem: self, attribute: .top, multiplier: 1.0, constant: 10) self.addconstraints([leftconstraint, topconstrai...