Re: IBPalette Custom Container view
Re: IBPalette Custom Container view
- Subject: Re: IBPalette Custom Container view
- From: Rainer Brockerhoff <email@hidden>
- Date: Sat, 20 May 2006 09:43:23 -0300
At 00:57 -0700 20/5/06, email@hidden wrote:
>From: Ricky Sharp <email@hidden>
>References: <email@hidden>
>In-Reply-To: <email@hidden>
>Date: Fri, 19 May 2006 22:24:49 -0500
>Message-ID: <email@hidden>
>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>On May 19, 2006, at 9:18 PM, Dominic Feira wrote:
>>
>>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.
FWIW, I found that implementing the (non-documented) method:
- (BOOL)editorHandlesCaches
{
return YES;
}
fixed some subview redrawing problems. Haven't tried removing it for the latest IB releases, though.
There must some other undocumented twiddling going on, as nesting several such custom views doesn't work as smoothly as it does with Apple's views...
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
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