• 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
Setting custom view background image via NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting custom view background image via NSImageView


  • Subject: Setting custom view background image via NSImageView
  • From: Artemiy Pavlov <email@hidden>
  • Date: Fri, 29 Sep 2006 19:01:49 +0300

Hello all!

I am trying to make my custom view have a background image. What I did is:

1. Add the UIbackground.png image to the project and the interface builder (shows as UIbackground in the "Images" tab of the builder)

2. Select all GUI elements, Layout -> make subview of -> custom view, set the custom class of this custom view to NSImageView

3. Define a connection

@interface SinevibesTransformerView : NSView
{
 	IBOutlet NSImageView *				uiView;
...
}

4. In the interface builder, connect the NSImageView custom view to uiView

5. Then in @implementation of my view:

- (void)awakeFromNib
{
	[uiView setImage: [NSImage imageNamed: @"UIbackground"]];
}

Is this the correct way? Asking this because it compiles fine but doesn't work ;-)


Thanks for any hints,

Artemiy.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Setting custom view background image via NSImageView
      • From: "Nick Kreeger" <email@hidden>
  • Prev by Date: Re: Thoroughly confused on date formatting
  • Next by Date: Re: cursor control fun
  • Previous by thread: Animation during scrollbar tracking
  • Next by thread: Re: Setting custom view background image via NSImageView
  • Index(es):
    • Date
    • Thread