如何刷新UITabBarController中的UIView?

发布于 2024-09-01 13:40:43 字数 113 浏览 5 评论 0原文

我正在刷新 TabBar 中的视图。 UIView 在我第一次按下 TabButton 时是只读的,下次不会“viewDidLoad”。我想每次按下按钮时刷新 UITableView 。

谢谢你!

I'm stack on refreshing view in TabBar. The UIView is read only first time I pressed the TabButton and does not "viewDidLoad" next time. I want to refresh UITableView every time I pressed the button.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

離人涙 2024-09-08 13:40:43

好的找到了一个解决方案(就在我在这里发布之后)

添加:

- (void)viewWillAppear:(BOOL)animated
{
    NSLog(@"View appears");
}

到您的 ViewController 中,您将看到通过单击 TabButton 来调用此方法;)

Ok Found a solution (just right after i posted this here)

add:

- (void)viewWillAppear:(BOOL)animated
{
    NSLog(@"View appears");
}

to your ViewController and you will see that this method will be called, by clicking the TabButton ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文