I am trying to set an image inside KDCircularProgress which is placed inside a UITableViewCell.
When I add an image from StoryBoard it successfully shows, but when I try to add it programatically the image does not appear.
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cellToReturn: DashBoardCell! = tableView .dequeueReusableCellWithIdentifier("DashBoardCell") as? DashBoardCell
if (cellToReturn == nil) {
cellToReturn = DashBoardCell(style: UITableViewCellStyle.Default, reuseIdentifier:"DashBoardCell")
}
let image: UIImage = UIImage(named: "ImageName")!
dImage = UIImageView(image: image)
dImage!.frame = CGRectMake(0,0,30,25)
dImage?.contentMode = UIViewContentMode.ScaleToFill
cellToReturn.dynamicImageView = dImage
dynamicImageView is the UIImageView outlet in UITableViewCell class and I am trying to set the dynamic image in table view cell in the View Controller class in which the TableView delegate methods are implemented.
What am I doing wrong?