• 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
Re: Subclassing IKImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing IKImageView


  • Subject: Re: Subclassing IKImageView
  • From: Fritz Anderson <email@hidden>
  • Date: Sun, 29 Jan 2012 11:27:59 -0600

On 29 Jan 2012, at 8:42 AM, Jan E. Schotsman wrote:

> I want to modify IKImageView so that it erases with the window background color. By default it erases with medium gray which looks awful.
>
> I tried implementing -drawRect but this is only called when the window opens. It isn't even called when the image is set to nil.
> Can one set the erase color of an NSView?

I'm curious — how does the instance property .backgroundColor not suit your purpose?

> Also I want to register the file url when the user drags an image file on the view. How do I go about that?
> Can I make it accept image files but not images in general?

I'd experiment with subclassing, then overriding the setImageWithURL: and setImage:imageProperties: methods. Possibly those aren't on the pipeline for drag-and-drop. In that case, my next experiment would be to override the <NSDraggingDestination> methods.

	— F


_______________________________________________

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: Subclassing IKImageView
      • From: "Jan E. Schotsman" <email@hidden>
    • Re: Subclassing IKImageView
      • From: "Jan E. Schotsman" <email@hidden>
References: 
 >Subclassing IKImageView (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Re: Is NSRuleEditor worth the learning curve?
  • Next by Date: Re: Drag and drop in collectionview
  • Previous by thread: Subclassing IKImageView
  • Next by thread: Re: Subclassing IKImageView
  • Index(es):
    • Date
    • Thread