I\'ve created a sub class of UIButton:
//
// DetailButton.h
#import
#import
@interface MyDetailButt
That exception is because the actual button that you are trying to get the annotation from is not of class MyDetailButton, it is a UIButton. Verify that you set the class in IB for that particular button. Select the button in IB and press ⌘4 to see its identity, change the Class Identity to MyDetailButton.