On Fri, 29 Jul 2011 00:24:56 -0500, William Squires <wsqui...@satx.rr.com> said: >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?
It depends on what you want to do. Is it that you'd like to know when a UIImageView is tapped? In that case, my book tells you how (using a gesture recognizer), and you can download code that demonstrates one approach: https://github.com/mattneub/Programming-iOS-4-Book-Examples/tree/master/p424hitTesting m. -- matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com