• 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: IBPalette Custom Container view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBPalette Custom Container view


  • Subject: Re: IBPalette Custom Container view
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 19 May 2006 22:24:49 -0500


On May 19, 2006, at 9:18 PM, Dominic Feira wrote:

Hello.

I just created a simple IBPalette that creates a NSView subclass. This works great. Everything is encoded and decoded properly. I thought I was done, but then I tried to add a sub-view to my newly created view. An lo and behold it isn't added as a sub-view at all. This seems odd considering that I sub-classed NSView.

I found some sample code online that implies that there is a lot of extra work to do in order to create container views in IB. Is this the case? I hope not.

It's not a lot of code; you just have to implement several methods:

- (BOOL)ibIsContainer
{
    return YES;
}

- (BOOL)ibSupportsInsideOutSelection
{
    return YES;
}

- (BOOL)ibDrawFrameWhileResizing
{
    return YES;
}

- (BOOL)ibSupportsLiveResize
{
    return YES;
}

- (BOOL)ibShouldShowContainerGuides
{
    return YES;
}

- (BOOL)canEditSelf
{
    return YES;
}

- (id)ibNearestTargetForDrag
{
    return self;
}

Of course adjust the returned BOOL values as needed for your particular situation.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
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


References: 
 >IBPalette Custom Container view (From: Dominic Feira <email@hidden>)

  • Prev by Date: Re: drawKnob in NSSliderCell subclass
  • Next by Date: Possible to customize the toolbar customization sheet?
  • Previous by thread: IBPalette Custom Container view
  • Next by thread: Re: IBPalette Custom Container view
  • Index(es):
    • Date
    • Thread