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

Categories

0 votes
487 views
in Technique[技术] by (71.8m points)

iphone - create custom delete button for uitableview

Im working on an ios app and my question is how to change the default button on swipe to delete on a uitableview. i see i can change the text with titleForDeleteConfirmationButtonForRowAtIndexPath but i want to change the image completely. ive been looking around for a way and all the posts about it may be out of date so just want to confirm with people before i go ahead with this. What im going to do is add a gesture recogniser to the cells themselves to catch the users swipe on individual cells and then add in my custom button and re arrange the cell frame from there and just forget about apples default swipe to delete completely. how that sound?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Here is a great open-source class for doing exactly this, based on the behavior of the Twitter app:

https://github.com/thermogl/TISwipeableTableView


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...