Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1935
SingleCellPaging and swipe gestures
posted

Two questions/issues...

1. I noticed infragistics doesn't accept mp4 videos for upload, but does accept many other video formats.  What is the danger inherent in accepting mp4 ?

2. I have a gridview set up for Single Cell Paging.

It is slightly inset on a parent view so that I can fake having a colored border around a grid image to indicate a state about that image.

For example, if the image was the most recent photo taken, it might have a red border around it, otherwise a white border.

Now referring to the video (uploaded compressed), notice that I start out on a photo that has a white border, and I swipe left to a photo with a red border.

Well the problem appears when I am swiping right, back to the photo with the white border (background view color).  Well, the red stays there all the way until the photo being swiped to is fully settled in, and only then is the red removed.  Well, that gives a moments false impression to the user that the photo is the most recent photo, until pageChanged fires and the decision to paint the backcolor is made, and then removes the red (or applies the red, as appropriate).

So maybe my inset gridview technique isn't going to work so well for this, and I'm looking for a better way to display a red border around the image only when it's settled, but the moment I go to move it, or shortly thereafter, the border is removed and not reapplied until the next image has settled in.

Well there's only a pageChanged event on the grid, but no pageChanging event, so I can't do that.

I tried willDeselectCellAtPath, but I guess that doesn't fire early enough during a swipe.

Is there a way I can tie into the swipe gesture on a SingleCell grid view, such that I could set my backcolor white when they begin a swipe left or right, and then set it to red/white once the swiped-to image has settled in?

2016-04-11_15-35-15.mp4.zip
Parents
  • 40030
    Offline posted

    Hi!

    1. I have no idea why we don't accept MP4s. :(

    2. This i can help you with :)

    So, you're correct, there is only a pageChanged event. And thats useful for selecting a cell. The pageChanged event only fires when the cell locks into place. You could listen to 

    -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView

    That will fire when you start scrolling, and should allow you to do what you're looking for. 

    However, I would suggest a different approach altogether. Instead of using an inset around the cell, and changing the background color of the grid... i would just use a custom cell. You would basically apply the background color to the cell based on whether your image was recently taken or not. Then you don't have to rely on events, b/c you'd be deciding the border around the image as its scrolled into view. 

    If you'd like  a sample demonstrating what i'm talking about, let me know and i'll put one together for you. Just let me know if you're doing this in Obj-c or C#. 

    -SteveZ

Reply Children