目前我有一个应用程序,您可以在8x8网格中移动来区分位置,还有一个按钮,用户可以将用户带到另一个视图并显示有关其角色的当前统计信息。然而,当他们回到原始视图时,他们目前将重置为他们的健康状态。我怎样才能让它们返回到视图时,它们处于与它们离开时相同的x,y坐标和统计数据?这是我目前在BCAViewController.m viewDidLoad方法
中的内容- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
BCAFactory *factory = [[BCAFactory alloc] init];
self.tiles = [factory tiles];
BCACaptain *captain = [[BCACaptain alloc] init];
self.captainsHealth = 50;
self.currentPoint = CGPointMake(0, 0);
[self updateTile];
[self updateButtons];
[self updateCurrentPos];
captain.health = self.captainsHealth;
self.healthLabel.text = [NSString stringWithFormat:@"%i", captain.health];
self.clueText.delegate = self;