title: EXC_BAD_ACCESS on adding uiimageview to custom uibutton on iPad 5.0 simulator but works on iPad 6.0 simulator
body: <p>My .h file</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface NavigationBarButton : UIButton
  
  @property(nonatomic, retain) UIImageView *barButtonImage;
  
  @property(nonatomic, retain) UILabel *barButtonLabel;
  
  - (id)initWithFrame:(CGRect)frame withImage:(UIImage *) image withTitle:(NSString *) title;
  </code></pre>
  
  <p>My .m file </p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame withImage:(UIImage *) image withTitle:(NSString *) title
  
  
  {
  
  self = [super initWithFrame:frame];
  
  if (self) 
  
  {  
          self = [UIButton buttonWithType:UIButtonTypeCustom];
  
          self.frame = frame;
          self.backgroundColor = [UIColor clearColor];
  
          barButtonImage = [[[UIImageView alloc] initWithFrame:CGRectMake(16, 1, 18, 23)]autorelease];
          [barButtonImage setImage:image];
  
          barButtonLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0, 26, 50, 10)]autorelease];
          barButtonLabel.backgroundColor = [UIColor clearColor];
          barButtonLabel.text = title;
          barButtonLabel.font = [UIFont systemFontOfSize:11];
          barButtonLabel.textAlignment = NSTextAlignmentCenter;
  
          [self addSubview:barButtonLabel];
          [self addSubview:barButtonImage];
  
          //[barButtonImage release];
          //[barButtonLabel release];
      }
      return self;
  }
  </code></pre>
  
  <p>but the app crashes on [self addSubview:barButtonLabel] which is strange because the code runs well on iPad 6.0 simulator but not on iPad 5.0 or iPad 5.1 simulator</p>