UITabBarController *tabBar = [[UITabBarControlleralloc]initWithNibName:nilbundle:nil];
UIViewController *addView = [[AddClassViewControlleralloc]initWithNibName:@"AddClassViewController"bundle:nil];
UINavigationController *addNav = [[UINavigationControlleralloc]initWithRootViewController:addView];
addNav.tabBarItem.title =@"添加班级";
// addNav.tabBarItem.image
UIViewController *checkView = [[CheckClassViewControlleralloc]initWithNibName:@"CheckClassViewController"bundle:nil];
UINavigationController *checkNav = [[UINavigationControlleralloc]initWithRootViewController:checkView];
checkNav.tabBarItem.title =@"查看班级";
UIViewController *otherView = [[ViewControlleralloc]initWithNibName:@"ViewController_iPhone"bundle:nil];
UINavigationController *otherNav = [[UINavigationControlleralloc]initWithRootViewController:otherView];
otherNav.tabBarItem.title =@"天气预报";
tabBar.viewControllers = [NSArrayarrayWithObjects:checkNav,addNav,otherNav, nil];