• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIImageView subclasses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: UIImageView subclasses
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: drawRect not getting called problem solved
  • Next by Date: Re: UIImageView subclasses
  • Previous by thread: Re: MPMoviePlayerController Fast forward
  • Next by thread: Re: UIImageView subclasses
  • Index(es):
    • Date
    • Thread