Objective c 堆栈设计中的不同层

Objective c 堆栈设计中的不同层,objective-c,xib,Objective C,Xib,您好,我需要有关所谓堆栈设计的帮助,在Xcode中的XIB文档中,不同的层彼此重叠。如果您将其置于viewDidLoad下,它应该可以工作 // Get the path NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [paths objectAtIndex:0]; NSString *pat

您好,我需要有关所谓堆栈设计的帮助,在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;

欢迎来到堆栈溢出。不清楚你在问什么以及下面的答案如何解决你的问题。也许你应该先看一下报纸。