Hi
I am having problem if i scroll again & again image gets more blacker . It is getting overlapped. I want Overlay effect only once. Below is the code
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tblView.dequeueReusableCell(withIdentifier: "cellDetail") as! DetailVCCell
let dict = testArray.object(at: indexPath.row) as! NSDictionary
let url = URL(string: dict.value(forKey: "aimg") as! String)
cell.imgViewDetail.kf.setImage(with: url)
let overlay: UIView = UIView(frame: CGRect(x:0, y:0, width: cell.imgViewDetail.frame.size.width, height: cell.imgViewDetail.frame.size.height))
overlay.backgroundColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 0.1)
cell.contentView.addSubview(overlay)
return cell
}
private func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return testArray.count
}
Thanks