I have a UITableView with each UITableViewCell having a black card like background UIView in it. The black cards are not entirely opaque but instead have an alpha of 0.6. All looks fine when I move scroll up and down, no issues.
What messes it up is when I move the Assistive Touch around on the UITableView. The Assistive Touch simply leaves black patches around wherever it was moved and the black patches stay until I scroll my UITableView again.
Has anyone else encountered such an issue before? Is there any work around/hack to avoid this?
Extra: When I try to take a screenshot it clears up.
This is what happens when I move the Assistive Touch around.
This is how it is supposed to look.
Code snippet as to how I am setting the background color and alpha for the cells in the table.
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
self.selectionStyle = .none
self.backgroundColor = UIColor.clear
self.background.backgroundColor = UIColor.black
self.background.alpha = 0.6
background.layer.backgroundColor = CGColor(colorSpace: CGColorSpaceCreateDeviceRGB(), components: [0.0, 0.0, 0.0, 0.6])
background.layer.masksToBounds = true
background.layer.shadowOffset = CGSize(width: -1, height: 1)
background.layer.shadowOpacity = 0.2
self.contentView.sendSubview(toBack: background)
}