我對iPhone編碼相當陌生,想知道是否有人可以幫助我。UIAlert for review頁面
已經得到了代碼準備,這樣當應用程序加載UIAletView負載,並提示用戶檢查/速率的應用程序,但我有一個名爲「永不率」
我需要幫助找出如何按鈕編碼「從不評分」按鈕,以便在每次加載應用程序時不會加載UI警報。
這是我到目前爲止的代碼:
(void)viewDidLoad {
UIAlertView *alert;
alert = [[UIAlertView alloc] initWithTitle:@"Rate My Appication" message:@" Please Rate my Application and check out my other Apps"
delegate: self
cancelButtonTitle:@" Cancel "
otherButtonTitles: @" Rate Now ", @"Check Other Apps", @" Never Rate ", nil];
[alert show];
[alert release];
}
(bool)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
// Never Review Button
if (buttonIndex == 3)
{
}
// Review Button
else if (buttonIndex == 1)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/gb/app/calculator/id389197581?mt=8"]];
}
// Other Apps Button
else if (buttonIndex == 2)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.com/apps/2headsolutions"]];
}
}
請格式化你的代碼,這僅僅是不可讀。此外,您應該更新您的問題,而不是發佈答案。 – Rengers 2010-10-02 15:57:04