Add will_present, on_presented, will_dismiss, and on_dismiss methods.