Hi people! Currently I have 52 cards UIImageViews in IB UIView.
And my objective is to drag 1 of this 52 cards into a Square, and if the the card is dropped into the Square, it will stay there. Otherwise, it will snap back it's original position.
MY question is which is a better method?
Creating a custom class NSObject and changing every card in IB into this class and using this code in the .m file. `- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:self.superview];self.center = location; }
Declaring 52 IBOutlets and make them respond to the same action
i)Subsidiary question: Is there a way i do not need to declare all 52 IBOutlets? ` Thank you in advance!