In our application, we have implemented a compass that rotates if the user rotates the map using the gesture. I have uploaded a sample project based on the esri compass sample. See below link
https://github.com/tmsbn/Esri-compass-sample.git
We have a sample in the SDK which from the sounds of it does what you are asking for. Have a look at it here.