-2
こんにちは私はXcodeのXIBドキュメントの中に別のレイヤーを重ねて配置するいわゆるスタックデザインの助けが必要です。スタックデザインの異なるレイヤー
こんにちは私はXcodeのXIBドキュメントの中に別のレイヤーを重ねて配置するいわゆるスタックデザインの助けが必要です。スタックデザインの異なるレイヤー
これをviewDidLoad
の下に置くとうまくいくはずです!
// Get the path
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentPath = [paths objectAtIndex:0];
NSString *path = [documentPath stringByAppendingPathComponent:@"highscore.save"];
// Create a dictionary to hold objects
NSMutableDictionary* myDict = [[NSMutableDictionary alloc] init];
// Read objects back into dictionary
myDict = [NSKeyedUnarchiver unarchiveObjectWithFile:path];
NSString *nssHighscore = [myDict objectForKey:@"Highscore"];
highscore = [nssHighscore intValue];
gameState = kStateMenu;
ballVelocity = CGPointMake(0, 0);
gravity = CGPointMake(0, kGravity);
controlType = kTouch;
ありがとう、それは働いた:) – Datakungen
ようこそスタックオーバーフロー。あなたが尋ねていることと、以下の答えがあなたの問題をどのように解決するかははっきりしていません。たぶんあなたは最初に "[どうすれば良い質問をしますか?](https://stackoverflow.com/help/how-to-ask)"を読んでください。 – andih