UIImageView subclasses
UIImageView subclasses
- Subject: UIImageView subclasses
- From: William Squires <email@hidden>
- Date: Fri, 29 Jul 2011 00:24:56 -0500
Hi all!
Here's what I've got: (Xcode 3.2.5 - iOS SDK 4)
A view controller that dynamically creates UIImageView subclass instances as subviews in it's awakeFromNib
According to the documentation, UIImageView subclasses do not enable user interaction by default, so
...
// Create a UIImageView that'll animate Number1.png through Number8.png, and load Number.png as the
// default (non-aminating) image
MyImageView *iv = [[MyImageView alloc] initWithBaseName:@"Number"];
[iv setUserInteractionEnabled:YES];
// ...
// Don't know what to do here!
// ...
[self.view addSubview:iv];
...
Okay, now what? How do I connect the "Touch Up Inside" of the UIImageView (subclass instance) to the
-(IBAction)customButtonTouched:(id)sender;
method of my view controller (the one that created the UIImageView subclass instances as subviews)
2nd question: how can I get first crack at the "Touch Up Inside" event (in the UIImageView subclass) before I pass it on to my view controller?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden