You have inadvertently declared one ivar called delegate
id <MyDelegate>delegate;
and another ivar called _delegate
@synthesize delegate = _delegate;
Some suggestions...
don't declare the iVar separately from your @property declaration
don't @synthesize, since XCode 4.4 you don't have to. The compiler will autosynthesize and autocreate an iVar with leading underscore
always refer to you ivar via it's property, inside and outside of your class. Only exceptions are in init, dealloc and inside custom setters and getters.
So this is how your code should look
@protocol MyDelegate <NSObject>
@required
- (void)update;
@end
@interface MyHandlerClass : NSObject
@property (nonatomic, weak) id <MyDelegate>delegate;
@end
@implementation MyHandlerClass
- (void)updateRequired: (id)sender
{
if(self.delegate)
{
[self.delegate update];
}
}
@end