I ran my game. When I wanna go to the game store view controller in simulator, the app crashes. See the code:
.h
@property (weak, nonatomic) IBOutlet UILabel *coinLabel;
@property (weak, nonatomic) IBOutlet UILabel *itemLabel;.m
int coin;
int itemQty;
- (IBAction)buy:(id)sender {
coin = coin - 50;
itemQty = itemQty + 1;
}
- (void)viewDidLoad {
[super viewDidLoad];
UILabel* itemLabel = [[UILabel alloc] init];
itemLabel.text = [NSString stringWithFormat:@"%d", itemQty];
UILabel* coinLabel = [[UILabel alloc] init];
coinLabel.text = [NSString stringWithFormat:@"%d", coin];
}
... //I didn't edit anything herePlease help. Thanks