TabBarController: 创建TabBar的控制器
注意:在点击的内容方法页面,添加头文件
#import "TabBarController.h"
#import "AppDelegate.h"
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
TabBarController*tab = (TabBarController *)delegate.window.rootViewController;
tab.selectedIndex = 1;