uialertcontroller

    0热度

    1回答

    我写了一个标签扩展检测标签中的链接。 它是链接的NSLinkAttributeName的归因文本,我使用 func handleTapOnLabel(_ tapGesture:UITapGestureRecognizer){}来检测点击在哪里以及要选择打开哪个链接。问题是我使用UILabel的扩展函数,我想提出一个UIAlertController来询问这个人 - “你将在Safari中打开这个链

    0热度

    2回答

    我想通过一些绿色动作来实现视图,并在UIAlertController中使选定的动作变为粗体。而其中一项行动,即解雇按钮必须与其他人分开,并以红色着色。 我想添加他们的样式.cancel允许显示解雇按钮,但它是大胆的,但绿色。 我该如何做到这一点? 预期的观点: 我当前的代码: let alertController = UIAlertController(title: nil,

    -1热度

    1回答

    我试图在用户没有向特定字段中输入文本时显示警告UIAlertAction。当该字段缺少文本并且用户按下发送时,该警报显示一会儿然后消失。 #pragma mark - Actions - (IBAction)sendPressed:(id)sender { if (_titleLabel.text.length == 0) { self.alert = [UIAlertC

    0热度

    1回答

    这是我AlertView代码触发: - (void)initializeAlertControllerForOneButtonWithTitle:(NSString *)title withMessage:(NSString *)msg withYesButtonTitle:(NSString *)yesButtonTitle withYesButtonAction:(id)yesButtonAc

    0热度

    3回答

    我想创建一个具有操作表样式的UIAlertController,但我想将背景颜色更改为灰色。我已经能够找到一种方法来改变UIAlertController的背景颜色,但不是取消按钮。取消按钮是单独的,保持白色。 这是我现在所拥有的代码: UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil messag

    1热度

    1回答

    我为我的应用程序强制更新,但是当我回去时不更新应用AlertController消失,因为它可以固定 如果你知道其他的选项,使强制更新强制更新应用程序,然后写 感谢您的帮助 func version(){ if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {

    0热度

    1回答

    的TabBar我有一个alertController: let alertController = UIAlertController(title: "Success", message: "Your book has been uploaded", preferredStyle: .alert) let PostBook = UIAlertAction(title: "OK", style:

    1热度

    1回答

    我使用PopoverController,我想摆脱背景阴影。苹果表示,要继承UIPopoverBackgroundView和override class var wantsDefaultContentAppearance: Bool { get } https://developer.apple.com/documentation/uikit/uipopoverbackgroundview/161

    0热度

    2回答

    我创建了一个覆盖层来运行,同时我运行一个异步数据抓取到服务器,以便用户不会继续按下UI中的按钮,直到数据抓取已经完成了。我已经把这个函数放到了一个全局的单例类中,我在传递一个布尔值的时候调用它来表示是否要显示或隐藏。我可以让它显示,但我无法隐藏它。下面是代码: class DataModel { static let sharedInstance = DataModel() f

    0热度

    2回答

    在下面的代码中,当我的web视图加载失败时,正如预期的那样,使用“重试”按钮正确显示警报。点击“重试”按钮时警报消失,但完成不会被调用。为什么是这样? func webView(_ webView: UIWebView, didFailLoadWithError error: Error) { let alert = UIAlertController(title: "Network E