,我發現了以下錯誤:類找不到方法的返回類型默認爲「身份證」
class method '+view' not found return type defaults to 'id'
使用此代碼:
[window addSubview:[ButtonsViewController view]];
有人可以幫助嗎?
這裏是全碼:
#import "openURLAppDelegate.h"
#import "ButtonsViewController.h"
#include "ButtonsViewController.h"
@implementation openURLAppDelegate
@synthesize window;
@synthesize ButtonsViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:[ButtonsViewController view]];
[window makeKeyAndVisible];
}
- (void)dealloc {
[ButtonsViewController release];
[window release];
[super dealloc];
}
@end
'ButtonsViewController'是一個類。你不能合成或釋放一個類。您應該爲此創建此類的實例。另外'include'指令應該被刪除。 – Alladinian 2012-04-28 13:01:27