added gesture recogniser to dismiss popup using UIGestureRecognizerDelegate ref #5