Monday, October 20, 2014

iOS Development: Moving a TabBar to the Bottom of a Screen Regardless of Size

-(void)viewDidLayoutSubviews
{
    
    UIScreen* screen = [[UIScreen screens] objectAtIndex:0];
    
    CGRect screenBounds = screen.bounds;
    
    self.tabBar.frame = CGRectMake(0,  screenBounds.size.height - self.tabBar.frame.size.height, self.tabBar.frame.size.width, self.tabBar.frame.size.height);
    
    [self.view addSubview:tabBar];
    

}

No comments:

Post a Comment