gpt4 book ai didi

ios - XLActionController 不知道任何类,例如 TweetbotActionController

转载 作者:行者123 更新时间:2023-11-29 05:32:16 24 4
gpt4 key购买 nike

我想打开一个 Tweetbot 操作 Controller ,它在 XLActionController 中作为示例提供。 :

let actionController = TweetbotActionController()

actionController.addAction(Action("View Details", style: .default, handler: { action in
// do something useful
}))
actionController.addAction(Action("View Retweets", style: .default, handler: { action in
// do something useful
}))
actionController.addAction(Action("View in Favstar", style: .default, handler: { action in
// do something useful
}))
actionController.addAction(Action("Translate", style: .default, executeImmediatelyOnTouch: true, handler: { action in
// do something useful
}))

actionController.addSection(Section())
actionController.addAction(Action("Cancel", style: .cancel, handler:nil))

present(actionController, animated: true, completion: nil)

我创建了一个TweetbotActionController实例,但它提示以下错误:

Use of unresolved identifier 'TweetbotActionController'

最佳答案

根据docs ,确保您有 Podfile,例如:

use_frameworks!

target '<Your App Target>' do
pod 'XLActionController'
pod 'XLActionController/Tweetbot'
end

为了使用提供的示例。

关于ios - XLActionController 不知道任何类,例如 TweetbotActionController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57433301/

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