Search code examples
swiftuiviewuiimageviewcell

Swift 4: Image inside UIView only display after second UIViewController call


I inserted a UIView with a image inside a Cell View like tha image bellow.

enter image description here

What i tried:

DispatchQueue.main.async { 
        self.hideProfileDescriptionView.addSubview(self.hidedescriptionLogo)
        self.hideProfileDescriptionView.bringSubview(toFront: 
        self.hidedescriptionLogo)
        self.cellDescriptionView.addSubview(self.hideProfileDescriptionView)
}

In the First time I call the UIVIewController, the image does not display, but in the second time I call UIViewController the image appears. How can I solve that.

Thanks


Solution

  • I realized that all cell content was not being displayed, so i discovered a flag that i did put on the code and i did disable that. Solved.