Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

customizing the leaf view #7

Closed
pwinward opened this issue Oct 17, 2011 · 5 comments
Closed

customizing the leaf view #7

pwinward opened this issue Oct 17, 2011 · 5 comments
Labels

Comments

@pwinward
Copy link

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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.

@pwinward
Copy link
Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants