我为恢复按钮编写了一些代码;
-(IBAction)restore:(id)sender
{
[[MKStoreManager sharedManager]buyFeature];
}
-(void)productPurchased
{
for (UIView *view in self.view.subviews)
{
if (view.tag==2000)
{
[view removeFromSuperview];
}
}
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Thank you" message:@"Your restore was successful." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}
// error restore
- (void)failed
{
for (UIView *view in self.view.subviews)
{
if (view.tag==2000)
{
[view removeFromSuperview];
}
}
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Error" message:@"Your restore has failed." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}
但它会在用户按下它时提示用户“购买”?这个对吗?我知道基本上同样的事情正在发生,因为它不会再次向他们收费,但我不想将此代码提交给苹果,只是让他们拒绝它,因为它不够清楚吗?
还是我做错了代码?
您的帮助将不胜感激,
问候,
阿涅利