title: UIBarButton with CustomView and a Border
body: <p>I've subclassed UIBarButtonItem and am trying to make a button which dispays a refresh image normally, but an activity spinner when loading. The problem I have is I can't get the bordered style to display a custom view inside. It just doesn't appear.</p>
  
  <p>This is my code (from my UIBarButtonItem subclass's constructor):</p>
  
  <pre><code>self = [super initWithTitle:@"" style:UIBarButtonItemStyleBordered target:self action:nil];
  UIView *viwInner = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 24,24)];
  [self.customView addSubview:viwInner];
  
  self.btnStandard = [UIButton buttonWithType:UIButtonTypeCustom];
  [self.btnStandard setFrame:CGRectMake(0, 0, 24,24)];
  UIImage *initialImage = [[UIImage imageNamed:@"refresh_24.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
  [self.btnStandard setBackgroundImage:initialImage forState:UIControlStateNormal];
  [self.btnStandard setBackgroundImage:initialImage forState:UIControlStateHighlighted];
  [self.btnStandard setBackgroundImage:initialImage forState:UIControlStateSelected];
  [self.btnStandard addTarget:self action:@selector(didTapInitialButton:) forControlEvents:UIControlEventTouchUpInside];
  [viwInner addSubview:self.btnStandard];
  
  self.btnLoading = [UIButton buttonWithType:UIButtonTypeCustom];
  [self.btnLoading setFrame:CGRectMake(0, 0, 24,24)];
  self.loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActionSheetStyleBlackOpaque];
  [self.loadingView setHidesWhenStopped:true];
  [self.loadingView stopAnimating];
  [self.btnLoading addSubview:self.loadingView];
  [self.btnLoading addTarget:self action:@selector(didTapAbortButton:) forControlEvents:UIControlEventTouchUpInside];
  [viwInner addSubview:self.btnLoading];
  
  return self;
  </code></pre>
  
  <p>Is there a reason this isn't working?</p>