当点击外部的UIAlertController时,如何排除UIAlertController?我可以添加一个UIAlertAction of style UIAlertActionStyleCancel来取消UIAlertController。但是我想添加一个函数,当用户点击UIAlertController外部时,UIAlertController就会关闭它。怎么做?谢谢。
我正在测试一个呈现UIAlertController的函数,但是测试总是失败。该函数如下所示: let alert = UIAlertController(
title: "Warning",shopViewController.presentBuyingErrorDiaologue(),然后使用XCTAssertTrue(shopViewController.presentedViewController is UIAlertController