Set up didSelectItemAtIndexPath to change views (and check device) and onClose to dismiss detail view