Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Budde88 on April 12, 2017, 04:48:58 AM

Title: How to swipe Cells in a UITABLE
Post by: Budde88 on April 12, 2017, 04:48:58 AM
Can anyone tell me how to set this up?

Basically I need a swipe left to delete function,
I am incorporating NGUI with Playmaker

I have provided a gif

email me braydonbudde@gmail.com
Title: Re: How to swipe Cells in a UITABLE
Post by: Budde88 on April 14, 2017, 06:40:35 AM
Anyone?

I really need this.

Thanks
Title: Re: How to swipe Cells in a UITABLE
Post by: ArenMook on April 14, 2017, 04:42:22 PM
Sorry, I can't help you with any Playmaker related questions. I don't know that tool.

Also, what you're trying to do shouldn't be done using a UITable. You should be using a vertical 1 column grid, where each cell is your row. The sliding / reveal effect should be a part of each row's prefab that gets instantiated.
Title: Re: How to swipe Cells in a UITABLE
Post by: Budde88 on April 15, 2017, 12:49:01 PM
Would you know how to do it with regular code?

Thanks
Title: Re: How to swipe Cells in a UITABLE
Post by: ArenMook on April 22, 2017, 11:13:03 AM
Well, as I mentioned -- just create a prefab for what a single row would look like, then instantiate multiple times underneath a vertical 1-column grid. This way you will get all your entries. To make it animate as you want, all you need to do is make that functionality on the prefab you've created -- the ability to slide to the right by dragging it. There is very little code involved -- just the part that would limit (or better yet -- implement) the dragging. Simply have an OnDrag function in the script that will handle it, and update the position based on the delta, capping it within some sane limits to prevent the ability to drag too far.