Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

How to weakify super access? #119

@k06a

Description

@k06a

I don't wanna strong capture self in this block:

void(^block)() = ^{
    [super someMethod];
};

Looks like I need to do something like this:

@weakify(self);
void(^block)() = ^{
    @storngify(self);
    [self.super someMethod];
};

But looks like this will not works as I want. I have solved this issue with this trick:

@weakify(self);
void(^block)() = ^{
    @storngify(self);
    [self superSomeMethod];
};

- (void)superSomeMethod {
    [super someMethod];
}

Is there any way to achieve this without creating helper method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions