Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Sweeping between views

$
0
0

Hi,

I have a view controller containing three views with a UIPageController on the bottom of each. I can click the controller to move it but would like to implement a sweep left / sweep right to move between the views. Currently I'm looking at sitting on override MotionEnded and having a bit of logic in there to say (pseudocode)

int currentPage = 1;
 // sweep left
 if (currentPage - 1 >= 0)
 {
    swapView(currentPage - 1);
    currentPage--;
 }
 // sweep right
 if (currentPage + 1 < 3)
 {
    swapView(currentPage + 1);
    currentPage++;
 }

Is this the right way to do it or is there a better way?

Paul


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>