gpt4 book ai didi

swift - UIApplicationOpenURLOptionsKey :Any return String:Any

转载 作者:行者123 更新时间:2023-11-30 11:22:07 24 4
gpt4 key购买 nike

我需要“options:(NSDictionary *)options”,但这是 swift4.1 中的“options:(NSDictionary *)options”。我该怎么办?

  • (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options NS_AVAILABLE_IOS(9_0); // no equiv. notification. return NO if the application can't open for some reason

最佳答案

目前尚不清楚您的问题是什么,但我会尝试猜测您正在寻找 open(_:options:completionHandler:) 方法。使用示例:

let url = URL(string: "https://google.com")!
UIApplication.shared.open(url) // options are equal to [:] and completionHandler is nil by default so they can be omitted

这是documentation对于这个方法。

关于swift - UIApplicationOpenURLOptionsKey :Any return String:Any,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51149592/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com