Handles presenting and dismissing modal views