iOS-tabbar控制从首页内容跳转到第二个Controller

闻人升
2023-12-01

    AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

    BMBaseTabController *tab = (BMBaseTabController *)delegate.window.rootViewController;

    tab.selectedIndex = 1;


拿到tabbar 单例,让当前选中变成 要跳转的controller个数

 类似资料: