applejuiceteaching
applejuiceteaching

Reputation: 1493

ios selected cell view in table view

I am trying to use a UITableView. In it I have a feature to swipe left and set an alarm. All this functionality is working except when I select a cell, which takes me to another view and go back. The swipe indicator is gone. I set the right swipe Icon by putting a view behind the text and setting the background image. When you swipe left a number appears (which is really just behind the views that shows the time the reminder will set. The problem is that a selected cell seems to remove the view with the background image. This is the only problem with this setup.

 self.panView.backgroundColor = UIColor(patternImage: UIImage(named: "tableSwipe.png")!)

enter image description here I would like the green swipe indicator to always be available. enter image description here

Upvotes: 0

Views: 73

Answers (1)

user4151918
user4151918

Reputation:

When a cell is selected, a selectedBackgroundView is added to its view hierarchy. This view appears above the backgroundView.

Your swipe indicator isn't visible in the selected cell, because it appears underneath the opaque selectedBackgroundView.

Upvotes: 1

Related Questions