第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在某一個tabitem頁面中再使用上面的方法就跳轉(zhuǎn)不了,估計是導(dǎo)航控制器對這些tabitem沒用?

在某一個tabitem頁面中再使用上面的方法就跳轉(zhuǎn)不了,估計是導(dǎo)航控制器對這些tabitem沒用?

iOS
繁星淼淼 2023-04-15 21:17:36
在AppDelegate.h中@property (strong, nonatomic) UINavigationController *navigationController;在AppDelegate.m中self.navigationController=[[UINavigationController alloc]initWithRootViewController:self.viewController];     [self.window addSubview:navigationController.view];在用navigationcontroller跳轉(zhuǎn)到一個tabbar的界面,主視圖為TabbarMain在TabbarMain.h中@interface TabbarMain : UITabBarController<UITabBarControllerDelegate>@property (strong, nonatomic) UITabBarController *controller;在TabbarMain.m中UIViewController *huntingMain=[[HuntingMain alloc]initWithNibName:@"HuntingMain" bundle:nil];    UIViewController *restaurantMain=[[RestaurantMain alloc]initWithNibName:@"RestaurantMain" bundle:nil];     restaurantMain.navigationController.view=self.navigationController;    UIViewController *settingMain=[[SettingMain alloc]initWithNibName:@"SettingMain" bundle:nil];   UIViewController *moreMain=[[MoreMain alloc]initWithNibName:@"MoreMain" bundle:nil];    controller=[[UITabBarController alloc]init];     controller.viewControllers=[NSArray arrayWithObjects:huntingMain, restaurantMain, settingMain,moreMain,nil];//添加4個tabitem     controller.delegate=self;     [self.view addSubview:controller.view];在TabbarMain.m是可以使用[self.navigationController pushViewController:view animated:YES];來進行頁面的跳轉(zhuǎn)但是在某一個tabitem頁面中再使用上面的方法就跳轉(zhuǎn)不了,估計是導(dǎo)航控制器對這些tabitem沒用(比如說在某個選項卡中有一個列表,單擊某項進行跳轉(zhuǎn)),不知道要怎么樣才能在tabitem的頁面中使用類似[self.navigationController pushViewController:view animated:YES];來進行跳轉(zhuǎn)
查看完整描述

1 回答

?
白板的微信

TA貢獻1883條經(jīng)驗 獲得超3個贊

用UINavigationController來組織你的Tabbar下的viewcontroller
TabbarMain.m

UIViewController *huntingMain=[[HuntingMain alloc]initWithNibName:@"HuntingMain" bundle:nil];

navigationController=[[UINavigationController alloc]initWithRootViewController:self.huntingMain];

controller=[[UITabBarController alloc]init];
    controller.viewControllers=[NSArray arrayWithObjects:navigationController, restaurantMain, settingMain,moreMain,nil];/


查看完整回答
反對 回復(fù) 2023-04-18
  • 1 回答
  • 0 關(guān)注
  • 182 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號