我目前正在爲Xcode SDK iOS 5上的iPhone開發一個Radio應用程序,並且我正在使用蘋果提供的StichedStreamPlayer中的一些元素。我有問題,問題是ApplicationDidFinishLaunching
部分Property'View;找不到類型爲「x」的對象
這裏是我的代碼:
appDelegate.m
#import "iGamerFMAppDelegate.h"
@class iGamerFMStreamingViewController;
@implementation iGamerFMAppDelegate
@synthesize window;
@synthesize iGamerFMViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
//Adds the streaming view controller once finished loading
[window addSubview:iGamerFMViewController.view];
[window makeKeyAndVisible];
}
-(void)dealloc
{
[window release];
[iGamerFMViewController release];
[super dealloc];
}
@end
我得到一個錯誤 - 物業「查看」上鍵入「iGamerFMViewController」的對象沒有找到 我已經嘗試了一切從重寫它從另一個項目複製和粘貼,它仍然不起作用。你知道爲什麼會發生這種情況嗎?
爲什麼在.m文件中有@class聲明?您需要導入.h文件。你如何初始化iGamerFMStreamingViewController? – hwaxxer
你可以發佈.h嗎? – Saphrosit
iGamerFMViewController是類還是對象? – sidyll