title: UIToolbar appearance for programmatically added tool bars
body: <p>I have two <code>UIToolbar</code> instances, one added at the top of the screen, one at the bottom. I'd like to style these using iOS 5 appearance protocol.</p>
  
  <p>I can get the following to work:</p>
  
  <pre><code>[[UIToolbar appearance] setBackgroundImage:[UIImage imageNamed:@"toolbarimage.png"]
                              forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
  </code></pre>
  
  <p>However, I am unable to get <code>UIToolbarPositionTop</code> or <code>UIToolbarPositionBottom</code> working with my programatically added toolbars. I am creating the tool bars like this:</p>
  
  <pre><code>_topBar = [[UIToolbar alloc] initWithFrame: CGRectMake(0, 0, self.view.frame.size.width, 44)];
  _topBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
  [self.view addSubview: _topBar];
  
  _bottomBar = [[UIToolbar alloc] initWithFrame: CGRectMake(0, self.view.frame.size.height - 44, self.view.frame.size.width, 44)];
      _bottomBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
      [self.view addSubview: _bottomBar];
  </code></pre>
  
  <p>As I understand it, UIToolbarPositionTop works fine with interface builder files, but does anyone know a way to get them working programmatically?</p>