App crashes when you select show answer button


#1

I am having trouble with the quiz app. The show question button works as it should but when I select the show answer button the app locks up and the button stays colored blue. In xcode the return line in Main.m is highlighted and it says “Thread 1: Signal SIGABRT” next to it :question: Any idea what I did wrong? Thanks.

#import <UIKit/UIKit.h>

#import "QuizAppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([QuizAppDelegate class]));
    }
}

Edit - Here is the output

2013-01-22 15:47:29.052 Quiz[996:c07] displaying question: What is the capital of Vermont? 2013-01-22 15:47:37.013 Quiz[996:c07] -[QuizViewController showAnswer:]: unrecognized selector sent to instance 0x742ff10 2013-01-22 15:47:37.014 Quiz[996:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QuizViewController showAnswer:]: unrecognized selector sent to instance 0x742ff10' *** First throw call stack: (0x1c8d012 0x10cae7e 0x1d184bd 0x1c7cbbc 0x1c7c94e 0x10de705 0x15920 0x158b8 0xd6671 0xd6bcf 0xd5d38 0x4533f 0x45552 0x233aa 0x14cf8 0x1be8df9 0x1be8ad0 0x1c02bf5 0x1c02962 0x1c33bb6 0x1c32f44 0x1c32e1b 0x1be77e3 0x1be7668 0x1265c 0x254d 0x2475) libc++abi.dylib: terminate called throwing an exception (lldb)


#2

Doh! :blush: Found it. I didn’t capitalize showAnswer (showanswer) in one of the files. Mods feel free delete this thread or leave it in case someone makes the same mistake.