gpt4 book ai didi

iphone - 如何在没有导航 Controller 的情况下更改 iPhone 中按钮单击的 View ?

转载 作者:搜寻专家 更新时间:2023-10-30 19:55:32 25 4
gpt4 key购买 nike

我想知道如何在没有导航 Controller 的 iPhone 中更改按钮点击时的 View ?

最佳答案

如果您使用 UIViewController 执行此操作,您可能会像下面这样执行此操作:

- (IBAction)change {
UIViewController* viewController = [[UIViewController alloc] init];
[self.view addSubView];
// Save the UIViewController somewhere if necessary, otherwise release it
}

但不确定您为什么不想使用 UINavigationController。如果您不想看到顶部的导航栏,可以使用相应的属性隐藏该栏。不确定它的名字,可能是 navigationBarHidden 或类似的东西。您可以在 API 中查找。

关于iphone - 如何在没有导航 Controller 的情况下更改 iPhone 中按钮单击的 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6290592/

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