gpt4 book ai didi

ios - Stripe STPAddCardViewController 导航栏不显示

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:02:23 24 4
gpt4 key购买 nike

我在我的代码中使用了 Stripe 。我的 viewController 中有一个 navigationBar

这是我的 viewController 的图片:

enter image description here

但是当我导航到 STPAddCardViewController 时,STPAddCardViewController 的导航栏没有显示。我正在使用这段代码:

let addCardViewController = STPAddCardViewController()

addCardViewController.delegate = self

navigationController?.pushViewController(addCardViewController, animated: true)

这是生成的图像:

enter image description here

出了什么问题?

最佳答案

您是否(可能在您的代码中的其他地方)做了某种(或类似的)会导致隐藏导航栏的事情?

self.navigationController?.navigationBar.isHidden = true

仅凭您发布的代码片段,我认为很难准确说明发生这种情况的原因。我们可能需要查看您的 ViewController 的更多代码

我建议查看您的代码是否没有执行上述操作。

这是一个非常简单的示例 VC,它使用 AddCardViewController 推送到导航 Controller 上,希望能有所帮助。这不应该有你描述的问题:

https://gist.github.com/spastorelli-stripe/9ec230dad7a7da5a6f85147deb6a4b3b

关于ios - Stripe STPAddCardViewController 导航栏不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51184028/

24 4 0