Hi all,
I have created three UIImageViews. I then added a UITextField to each image as a subview.
When the user clicks on the text field I want to capture which UIImageView ths text field belongs to. I am trying the following code :
-(void)textFieldDidBeginEditing : (UITextField *)textField {
textField = retainedObject;
MyPicture *capture = nil;
for (UIImageView *oneView in retainedObject.superview) {
if ([oneView isMemberOfClass:[myPicture class]])
capture = (UIImageView *)oneView;
}
However I get an error that UIView may not respond to count by enumeration. It looks like the superview of the textfield is UIView rather than UIImageView perhaps ? Can anybody help solve this ?
Thanks,
Martin