奇怪的视图控制器 - iPhone SDK
我有一个用于我正在制作的 iPhone 应用程序的选项卡栏应用程序。我在第三个视图(第三个选项卡)上创建一个简单的按钮,并为其提供一个 IBAction 以提供警报视图。当我按下构建并运行时,一切正常。我进入第三个选项卡,然后按下按钮。它只是崩溃了......为什么会发生这种情况?我在第三个选项卡中放入的所有内容都会崩溃。我创建了一个简单的视图控制器,并编写了类文件以重新开始,但我不断收到相同的错误。在我的第一个选项卡上一切正常,我最初在其中获得了第一个视图控制器。PS
>它还说“ThirdViewController”类的不完整实现。我不知道为什么它在那里。
如果有人可以在这里帮助我,我将不胜感激。
凯文
I have a Tab-Bar Application for this iPhone application I am making. I make a simple button on the 3rd view (3rd tab), and give it an IBAction to give an alert view. When I press build and go, everything works out fine. I go onto the 3rd tab, and I press my button. It simply crashes... Why is this happening? Everything I put in this 3rd tab crashes. I create a simple view controller, and write the class files to start over, but I keep getting the same errors.. Everything works fine on my first tab, where I originally got the first view controller..
P.S> It also says Incomplete Implementation of Class 'ThirdViewController'. I don't know why its there..
If anyone can help me out here, i would greatly appreciate it.
Kevin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它和 UIAlertView,对吧?
此类需要实现协议 UIAlertViewDelegate 和方法alertView:clickedButtonAtIndex: 来处理按钮单击,这就是编译器告诉您它不完整的原因。
无论如何,我第一次使用 UIAlertView 时遇到了一些问题。
我的问题出在 otherButtonTitles 参数上,列表必须以 nil 终止,如下所示:
无论如何,您可以找到有关控制台崩溃的有用调试信息,请尝试将其发布到此处。
It's and UIAlertView, right ?
This class requires the implementation of the protocol UIAlertViewDelegate and the method alertView:clickedButtonAtIndex: to handle the button click, that's why the compiler tell you that it's incomplete.
Anyway i expirienced some problems on the UIAlertView the first time i used it.
My issues was on the otherButtonTitles parameters, the list must be terminated by nil, like this:
Anyway, you can find useful debug about the crash into your console, try to post it here.