0

だから私はちょうど新しいプロジェクトを作成しました、そして私がファイルに触れる前にそれはエラーを示しています、私はXcodeに非常に新しいです、しかしここに私のコードがあります:

#import "ViewController.h"

@interface "ViewController.h"

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}

@end

そして、「@ interface"ViewController.h"」のタイトルにあるエラーが表示されます。

4

2 に答える 2

8

それがエラーです。あなたが欲しい@interface ViewController

于 2012-06-24T18:44:02.320 に答える
0

です

@interface ViewController


@end 

ヘッダー、フレームワーク" "をインポートするときに使用する必要があります。<>

@interfaceはObjective-cオブジェクトであり、この場合はクラスであるため、は必要ありません""

于 2012-06-24T19:43:45.733 に答える