Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

ios7 crash #36

Open
Qiunee opened this issue May 14, 2015 · 2 comments
Open

ios7 crash #36

Qiunee opened this issue May 14, 2015 · 2 comments

Comments

@Qiunee
Copy link

Qiunee commented May 14, 2015

When i use in IOS7. in here objc_setAssociatedObject will crash.

@zhuhao528
Copy link

  • (NSInteger)subRow
    {
    id indexpath = [NSIndexPath class];
    id subRowObj = objc_getAssociatedObject(indexpath, SubRowObjectKey);
    return [subRowObj integerValue];
    }
  • (void)setSubRow:(NSInteger)subRow
    {
    id subRowObj = [NSNumber numberWithInteger:subRow];
    id indexpath = [NSIndexPath class];
    objc_setAssociatedObject(indexpath, SubRowObjectKey, subRowObj, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    }
    My solution but i don't know whether it is the best

@mariovillamizar
Copy link

Yes, that's working for me. Please update the control with this change.

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

No branches or pull requests

3 participants