Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AQGridViewCell reuseIdentifier property should not be read-only #19

Closed
jdmuys opened this issue Aug 31, 2010 · 6 comments
Closed

AQGridViewCell reuseIdentifier property should not be read-only #19

jdmuys opened this issue Aug 31, 2010 · 6 comments

Comments

@jdmuys
Copy link

jdmuys commented Aug 31, 2010

Since it's not possible to set the identifier of the cell in Interface Builder, it has to be initialized in awakeFromNib. However this is not possible since the reuseIdentifier property is declared read-only in the @interface. This prevents me from doing the following in my cell subclass:

- (void)awakeFromNib {
    [super awakeFromNib];
    self.reuseIdentifier = @"CellIdentifier";
}

Note that this property is privately redeclared read-write in the implementation file, which lets AQGridViewCell do it in its initialization routines:

    self.reuseIdentifier = reuseIdentifier;

Of course, I can still do (and indeed I must do):

    _reuseIdentifier = @"CellIdentifier";

But that kind of defeats the idea of a property.

Of course, if AQGridViewCell was a subclass of UITableViewCell, this would be moot as I could set the identifier in IB.

@AlanQuatermain
Copy link
Owner

Feel free to pretend it's read-write, or to redefine it in the header file (or your subclass's implementation file) for your purposes. Proper IB support is on the roadmap, but not very close right now as I have other priorities. That would be preferable to any attempt to make it piggy-back on UITableViewCell, which implements a lot of UITableView-specific stuff— trust me, I'm a reverse-engineer ;o)

@jdmuys
Copy link
Author

jdmuys commented Aug 31, 2010

I trust you :-)
Thanks for your time.

@evadne
Copy link
Collaborator

evadne commented Jan 26, 2012

Closing as resolved.

@evadne evadne closed this as completed Jan 26, 2012
@yuzhouwww
Copy link

Thanks for your brilliant working.I want to know how you resolved this issue,i saw the property reuseidentifer is still readonly.

@evadne
Copy link
Collaborator

evadne commented Jun 29, 2013

Just change the ivar or use Key-Value Coding which does access the ivar for
you.

On Jun 29, 2013, at 6:12, yuzhou notifications@github.com wrote:

Thank for your brilliant working.I want to know how you resolved this
issue,i saw the property reuseidentifer is still readonly.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/19#issuecomment-20229551
.

@yuzhouwww
Copy link

Thanks for your time.I added a contentView in XIB and changed the ivar _reuseIdentifier,it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants