Bug avec le bouton répéter

Bonjour à tous !
J’ai commencé swift hier avec les cours « Apprendre à créer des apps pour iPhone ». J’en suis à la vidéo « Objets graphiques et Outlets », et j’ai un petit bug.
J’ai le même code que Maxime, mais quand je lance le simulateur et que je clique sur le bouton, le simulateur crash et j’ai cette erreur :

Erreur

18-06-10 20:46:44.114764+0200 Test[32529:1505207] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/Elliot/Library/Developer/CoreSimulator/Devices/A4436246-9686-40EB-B189-FB6A81F8BF58/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-06-10 20:46:44.115166+0200 Test[32529:1505207] [MC] Reading from private effective user settings.
2018-06-10 20:46:47.982286+0200 Test[32529:1505207] -[Test.ViewController repeatButton]: unrecognized selector sent to instance 0x7f7f9590cea0
2018-06-10 20:46:47.986578+0200 Test[32529:1505207] *** Terminating app due to uncaught exception ‹ NSInvalidArgumentException ›, reason: ‹ -[Test.ViewController repeatButton]: unrecognized selector sent to instance 0x7f7f9590cea0 ›
*** First throw call stack:
(
0 CoreFoundation 0x0000000110f491e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010d350031 objc_exception_throw + 48
2 CoreFoundation 0x0000000110fca784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 UIKit 0x000000010de1a6db -[UIResponder doesNotRecognizeSelector:] + 295
4 CoreFoundation 0x0000000110ecb898 forwarding + 1432
5 CoreFoundation 0x0000000110ecb278 _CF_forwarding_prep_0 + 120
6 UIKit 0x000000010dbed3e8 -[UIApplication sendAction:to:from:forEvent:] + 83
7 UIKit 0x000000010dd687a4 -[UIControl sendAction:to:forEvent:] + 67
8 UIKit 0x000000010dd68ac1 -[UIControl _sendActionsForEvents:withEvent:] + 450
9 UIKit 0x000000010dd67a09 -[UIControl touchesEnded:withEvent:] + 580
10 UIKit 0x000000010dc620bf -[UIWindow _sendTouchesForEvent:] + 2729
11 UIKit 0x000000010dc637c1 -[UIWindow sendEvent:] + 4086
12 UIKit 0x000000010dc07310 -[UIApplication sendEvent:] + 352
13 UIKit 0x000000010e5486af __dispatchPreprocessedEventFromEventQueue + 2796
14 UIKit 0x000000010e54b2c4 __handleEventQueueInternal + 5949
15 CoreFoundation 0x0000000110eebbb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
16 CoreFoundation 0x0000000110ed04af __CFRunLoopDoSources0 + 271
17 CoreFoundation 0x0000000110ecfa6f __CFRunLoopRun + 1263
18 CoreFoundation 0x0000000110ecf30b CFRunLoopRunSpecific + 635
19 GraphicsServices 0x0000000113840a73 GSEventRunModal + 62
20 UIKit 0x000000010dbec057 UIApplicationMain + 159
21 Test 0x000000010ca47c17 main + 55
22 libdyld.dylib 0x000000011212a955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Je ne comprends pas trop sa signification, et sinon voila un screen de mon Xcode après le crash (ce n’est pas vraiment un crash, juste l’application (du simulateur) devient obsolète : on ne peux plus rien faire dessus, cliquez nul part etc) :

Merci d’avance !

[EDIT] : Je crois qu’il parle de mon problème dans sa vidéo « Erreur courante » :stuck_out_tongue:
[EDIT 2] : Non :frowning:

En effet, ton erreur fait partie de celles mentionnées dans la vidéo erreurs courantes :
tu as une action ou un outlet repeatButton qui a été créé depuis le storyboard et tu l’as ensuite supprimé du code en swift.
Il te faut retrouver ce lien dans ton storyboard et le supprimer pour ne plus avoir le crash par la suite :slight_smile:

1 « J'aime »

En effet ! J’avais pas fais gaffe.

Merci beaucoup !

1 « J'aime »