Author Topic: How to swipe Cells in a UITABLE  (Read 2798 times)

Budde88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
How to swipe Cells in a UITABLE
« 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

Budde88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: How to swipe Cells in a UITABLE
« Reply #1 on: April 14, 2017, 06:40:35 AM »
Anyone?

I really need this.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to swipe Cells in a UITABLE
« Reply #2 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.

Budde88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: How to swipe Cells in a UITABLE
« Reply #3 on: April 15, 2017, 12:49:01 PM »
Would you know how to do it with regular code?

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to swipe Cells in a UITABLE
« Reply #4 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.