I'm trying to implement something similar to the C# delegate concept in Objective-C. I assumed it could be done, but I'm struggling to make it work. I've set up a type def for my block:

```
typedef BOOL (^CompareBlock)(id obj1, id obj2);

```

I also have a property of a class for the block:

```
@property (nonatomic, copy) CompareBlock compareBlock;

```

What I want to do is set the property in the `init` method with a reference to a preexisting method:

```
BOOL isGreaterThan(id obj1, id obj2)
{
     // perform some comparison

     return false;
}

- (id)init
{
    self = [super init];

    if (self)
        self.compareBlock = isGreaterThan;

    return self;
}

```

I know this isn't the right syntax, but I can't figure out how this concept could be achieved. I've tried casting the function to the block typedef that I defined, but an error says that that isn't allowed with ARC.

Does anybody know how to solve this problem?