Re: IBPalette Custom Container view
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