added functionality for disabling panning and delegate method for didHideController