Add swipe support for mobile methods (fix #3989)

Fixes regression caused by #3989.  There are also some formatting fixes that I've noted.