Add swipe-to-switch functionality