customizing the leaf view #7

pwinward opened this Issue Oct 17, 2011 · 5 comments


None yet
2 participants

Thanks for the great work you've put into this. I have a couple observations.

In my leaf view subclass, I tried setting the fill color within initWithFrame but found that it wasn't being called. InitWithCoder is though. Additionally, although the fill color was being set, it was later being reset by configureDetaults in PSBaseLeafView.m because of a call from within awakeFromNib.


epreston commented Oct 18, 2011

Thank you for the feedback :-)

I think that is an issue i created with the way I implemented that. I was having some issue a year ago and the call was placed in "awakeFromNib". The code should be redone to use UIKit methods to set display properties (where possible), and configuration should take place in InitWithCoder / initWithFrame calls like:

    - (id) initWithFrame:(CGRect)frame {
        if ((self = [super initWithFrame:frame])) {

            // Configure stuff here

        return self;

Get back to you shortly.


epreston commented Oct 18, 2011

Removed the awakeFromNib code for an implementation of NSCoding. Updated the examples.

This should fix things up and make it a little more clear. It is also a step towards an interface builder plugin that will allow designers to configure the presentation of the control directly. Tell me what you think. :-)


epreston commented Oct 18, 2011

Almost forgot, added a selectionColor property to the LeafView. Yellow might not be everyones cup of tea. :-)

I can tell by your silence that you won't be happy until we have an interface builder plugin. I won't be happy until we have an interface builder plugin. We need an interface builder plugin.


epreston commented Oct 18, 2011

IBPlugin's are no longer supported. Must have missed the memo...

Well, that stops that then. I guess the only use for NSCoding will be to capture display state preferences if you make that available to users.

@epreston epreston closed this Oct 18, 2011

Thanks for responding so quickly and making the changes. I'll try out the latest release when I get the chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment