I am trying to set a UIImageView's image equal to a certain image:
- (IBAction)showCard:(id)sender {
for (KCCardView *cardView in self.view.subviews) {
for (KCCard *aCard in dealerHand) {
cardView.image = aCard.cardImage;
}
}
}
But all that keeps happening is the app crashes and the following is logged to the console. I can't seem to find the bug.
-[UIRoundedRectButton setImage:]: unrecognized selector sent to instance
Thank you!
(gdb) backtrace
#0 0x012deccc in objc_exception_throw ()
#1 0x01150f0d in -[NSObject doesNotRecognizeSelector:] ()
#2 0x010b5e2f in ___forwarding___ ()
#3 0x010b5c12 in __forwarding_prep_0___ ()
#4 0x011510e9 in -[NSObject performSelector:withObject:withObject:] ()
#5 0x000197fd in -[UIApplication sendAction:to:from:forEvent:] ()
#6 0x00019792 in -[UIApplication sendAction:toTarget:fromSender:forEvent:] ()
#7 0x000be2aa in -[UIControl sendAction:to:forEvent:] ()
#8 0x000be773 in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
#9 0x000bda3e in -[UIControl touchesEnded:withEvent:] ()
#10 0x0003eb04 in -[UIWindow _sendTouchesForEvent:] ()
#11 0x0003ed2d in -[UIWindow sendEvent:] ()
#12 0x0002550c in -[UIApplication sendEvent:] ()
#13 0x00018d00 in _UIApplicationHandleEvent ()
#14 0x00deb7fe in PurpleEventCallback ()
#15 0x01123435 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#16 0x01087d72 in __CFRunLoopDoSource1 ()
#17 0x0108665a in __CFRunLoopRun ()
#18 0x01085b04 in CFRunLoopRunSpecific ()
#19 0x01085a1b in CFRunLoopRunInMode ()
#20 0x00de9f67 in GSEventRunModal ()
#21 0x00dea02c in GSEventRun ()
#22 0x00016cf2 in UIApplicationMain ()
#23 0x00001ed8 in main (argc=1, argv=0xbfffed94) at /Users/Alec/Desktop/Blackjack/Blackjack/main.m:16
#24 0x00001e35 in start ()