在引用的项目中导入主项目文件?
我在我的应用程序中整合了three20项目。我想回到被叫班上去。但无法导入该类。 这是我在做TTPhotoViewController:在引用的项目中导入主项目文件?
MainMenuVC *mmenu = [[MainMenuVC alloc] init];
[self.navigationController pushViewController:mmenu animated:YES];
[mmenu release];
但xcode的斜面文件这个类。 “使用未声明的标识符的......”
我试图导入像下面,但没有工作:
#import <MyApp/MainMenuVC.h>
#import "MyApp/MainMenuVC.h"
#import <../MyApp/MainMenuVC.h>
必须尝试这个
[self.navigationController popToRootViewController animated:YES];
您不能导入类文件反之亦然这意味着。 如果进口A类这样的B类:进口“B” 无法导入A类B类是这样的:进口“A” 改用@class“A”在.h文件中
已经厌倦了以下,但没有奏效。 '[self.navigationController popToRootViewControllerAnimated:YES]; [self.parentViewController.navigationController popToRootViewControllerAnimated:YES]; [[self parentViewController] popToRootViewControllerAnimated:YES]; [self dismissModalViewControllerAnimated:YES]; ' – MehrozKarim
谢谢Sumanth。我在.h文件中添加@class。然后执行: MainMenuVC * mmenu = [[MainMenuVC alloc] init]; [self.navigationController pushViewController:mmenu animated:YES]; [mmenu release]; 它的工作。 – MehrozKarim
如果您获得解决方案,您需要通过单击刻度线并接受答案来接受答案 – Sumanth
#进口“ MainMenuVC.h“你试过了吗? – janusbalatbat
甚至也厌倦了这一点。但没有奏效。 #import“MainMenuVC.h” – MehrozKarim