2012-05-28 62 views

回答

4

Appirater

我在我的應用程序使用它你可以使用。 您可以定義時,應用程序會要求用戶進行評分

1

它的條件是你打多少次遊戲

我在我的應用程序完成這個功能,你只儲存的狀態NSUserDefault這樣的應用程序就像一次播放2,3次播放只是存儲狀態,並且在遊戲開始時每次檢查存儲在NSUserDefault中的值的條件(如果計數器(NSUserDefault值)大於3)比調用代表InApp購買並繼續祝你好運。

你可以這樣做: -

NSInteger counter=[[NSUserDefaults standardUserDefaults]integerForKey:@"value"]; 
if (counter) 
{ 
    counter=counter + 1; // counter ++ 
    [[NSUserDefaults standardUserDefaults]setInteger:counter forKey:@"value"]; 
} 
else 
{ 
    [[NSUserDefaults standardUserDefaults]setInteger:1 forKey:@"value"]; 
} 
// At the beginning of the game check the condition. 
if (counter > 3) 
{ 
    // Call InApp Purchase 
} 
相關問題