2017-04-20 4 views
-2

こんにちは私はXcodeのXIBドキュメントの中に別のレイヤーを重ねて配置するいわゆるスタックデザインの助けが必要です。スタックデザインの異なるレイヤー

+0

ようこそスタックオーバーフロー。あなたが尋ねていることと、以下の答えがあなたの問題をどのように解決するかははっきりしていません。たぶんあなたは最初に "[どうすれば良い質問をしますか?](https://stackoverflow.com/help/how-to-ask)"を読んでください。 – andih

答えて

-1

これを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; 
+0

ありがとう、それは働いた:) – Datakungen

関連する問題