title: Setting Finished TabBar images when using storyboards?
body: <p>I am working on an application where the bulk of the UI is setup via a Storyboard in Xcode. One thing that I want to do is specify "Finished" images for the UITabBarItems on a TabBar rather than the default "Stencilled" images that you can access via Interface Builder.</p>
  
  <p>My question is where is the best place to do this, I am currently doing it in awakeFromNib as it needs to be done when things are unarchived from the storyboard, but I as unsure if I should be using initWithCoder: instead, which is best does it matter?</p>
  
  <pre><code>- (id)initWithCoder:(NSCoder *)aDecoder {
      self = [super initWithCoder:aDecoder];
      if(self) {
          UIImage *tabIn  = [UIImage imageNamed:@"TAB_IN"];
          UIImage *tabOut = [UIImage imageNamed:@"TAB_OUT"];
  
          UITabBarItem *tabBarItem = [self tabBarItem];
          [tabBarItem setFinishedSelectedImage:tabOut withFinishedUnselectedImage:tabIn];
          [tabBarItem setTitle:@"TWO"];
      }
      return self;
  }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>- (void)awakeFromNib {
      [super awakeFromNib];
      UIImage *tabIn  = [UIImage imageNamed:@"TAB_IN"];
      UIImage *tabOut = [UIImage imageNamed:@"TAB_OUT"];
  
      UITabBarItem *tabBarItem = [self tabBarItem];
      [tabBarItem setFinishedSelectedImage:tabOut withFinishedUnselectedImage:tabIn];
      [tabBarItem setTitle:@"TWO"];
  }
  </code></pre>
  
  <p>I understand that <code>initWithCoder:</code> is called at the start of unarchiving objects from nibs (contained in the storyboard) when outlets and actions are not yet hooked up. I also understand that <code>awakeFromNib</code> is called at the end of the unarchiving process and signals that the viewController is now ready for use. My feeling is that it really just depends on what you want to do, although using <code>awakeFromNib</code> might prove less problematic as your not going to hit issues where outlets and actions are not yet hooked up.</p>
  
  <h1>EDIT:</h1>
  
  <p>Let me rephrase this, what situations would you use <code>initWithCoder:</code> as apposed to <code>awakeFromNib</code> and vice versa?</p>