Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am creating a custom SwipeableCell to left/right. I want to detect touch outside of current cell to return it to default state. How can I do that?

Picture of my program

I know how to return cell to default state, but I don't know how to detect touch.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
254 views
Welcome To Ask or Share your Answers For Others

1 Answer

Lets save the current NSIndexPath on the viewController, when you swipe on it to some variable.

In didSelectCellForRow, if the saved indexPath is not equal with the indexPath coming in, than lets restore the state of cell at the saved indexPath.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...