ios uiviewcontroller uitabbarcontroller 的子级
我的项目底部有一个 uitabbarcontroller 。 选项卡栏的按钮链接我的视图控制器... 一切正常,我插入了一些图像、按钮,在模拟器中我看到了这些东西。 现在我需要在加载事件上做一些事情...... 我取消了这段代码的注释:
- (void)viewDidLoad {
[super viewDidLoad];
}
但是在这里设置断点,不会中断......模拟器正确加载视图,但没有加载viewDidLoad......
我该如何解决这个问题?
提前致谢!
I have my project that have a uitabbarcontroller on the bottom.
a button of the tab bar links my viewcontroller...
the things works, I inserted some images, buttons and in the simulator I see these things.
now I need to make something on the load event...
I uncommented this code:
- (void)viewDidLoad {
[super viewDidLoad];
}
but setting a breakpoint here, doesn't break..... the simulator loads the view correctly but doesn't load the viewDidLoad...
how can I solve this?
thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定你是否仍然遇到这个问题,但我刚刚遇到了完全相同的事情。事实上,我不久前就遇到了这个问题,不得不绞尽脑汁来记住我做了什么。我通过确保第一个选项卡中的笔尖选择和最后一个选项卡中的类名选择设置正确来解决了这个问题。您可以只设置 nib 文件名,一切都会正常工作,但会实例化一个基类,可能是 UIViewController。在 IB 中,您可以在其中设置每个选项卡的属性。
Not sure if you still have this problem but I just ran into the exact same thing. In fact I had the problem a while ago and had to rack my brain to remember what I did. I solved it by making sure both the nib selection in the first tab and that class name selection in the last tab are set correctly. You can set just the nib file name and everything will appear to work but will instantiate a base class, likely a UIViewController. This is in IB where you set the attributes for each tab.