title: How can I position my UIView to the bottom of the screen?
body: <p>I have the following code to show a little notification bar right above a <code>UITabViewController</code>:</p>
  
  <pre><code>- (void)showNotificationBar
  {
      if(mentionsButton.hidden)
      {
          //DM button on the left
          [dmButton setFrame:CGRectMake(20,-2, 140, 35)];
          [directMessagesPill setFrame:CGRectMake(6, 7, 29, 20)];
          [dmCountLabel setFrame:CGRectMake(11, 5, 19, 21)];
          [directMessagesLabel setFrame:CGRectMake(43, 6, 81, 21)];
  
          //Mentions on the right
          [mentionsButton setFrame:CGRectMake(162,-2, 140, 35)];
          [mentionsPill setFrame:CGRectMake(161, 7, 29, 20)];
          [mentionCountLabel setFrame:CGRectMake(166, 6, 19, 21)];
          [mentionsLabel setFrame:CGRectMake(193, 6, 86, 21)];
  
      }
      else
      {
          //Mentions on the left
          [mentionsButton setFrame:CGRectMake(20,-2, 140, 35)];
          [mentionsPill setFrame:CGRectMake(6, 7, 29, 20)];
          [mentionCountLabel setFrame:CGRectMake(11, 5, 19, 21)];
          [mentionsLabel setFrame:CGRectMake(43, 6, 81, 21)];
  
          //DM on the right
          [dmButton setFrame:CGRectMake(162,-2, 140, 35)];
          [directMessagesPill setFrame:CGRectMake(161, 7, 29, 20)];
          [dmCountLabel setFrame:CGRectMake(166, 5, 19, 21)];
          [directMessagesLabel setFrame:CGRectMake(193, 6, 86, 21)];
      }
  
      if(!mentionsButton.hidden &amp;&amp; !dmButton.hidden)
          notificationDivider.hidden = NO;
  
      if(!self.tabBarController.tabBar.hidden)
      {
          //CGRect frame = CGRectMake(0, 0, 320, 32);
          CGRect frame = CGRectMake(0, 500, 320, 32);
          //frame.origin.y = CGRectGetMaxY(self.navigationController.navigationBar.frame) - frame.size.height;
          frame.origin.y = self.tabBarController.tabBar.frame.origin.y;
          notificationBar.frame = frame;
  
          //[self.navigationController.navigationBar.superview insertSubview:notificationBar belowSubview:self.navigationController.navigationBar];
          [self.tabBarController.tabBar.superview insertSubview:notificationBar belowSubview:self.tabBarController.tabBar];
  
          [UIView animateWithDuration:0.5 animations:^{
              CGRect frame = notificationBar.frame;
              //frame.origin.y = CGRectGetMaxY(self.navigationController.navigationBar.frame);
              frame.origin.y -= frame.size.height;
              notificationBar.frame = frame;
          }];
      }
      else
      {
          CGRect frame = CGRectMake(0, 500, 320, 32);
          frame.origin.y = self.navigationController.toolbar.frame.origin.y;
          notificationBar.frame = frame;
  
          [self.navigationController.toolbar.superview insertSubview:notificationBar belowSubview:self.navigationController.toolbar];
  
          [UIView animateWithDuration:0.5 animations:^{
              CGRect frame = notificationBar.frame;
              frame.origin.y -= frame.size.height;
              notificationBar.frame = frame;
          }];
      }
  }
  </code></pre>
  
  <p>The problem is, there is a gap between this <code>UIView</code> and a <code>UIToolbar</code> when I switch tabs to a <code>UINavigationController</code> that hides the tabbar. How can I reposition it so that it goes down?</p>