我有此應用程序完成啓動時彈出的警報視圖(免責聲明)。它的工作原理(我的應用程序現在慢得多),但如果用戶按no, thanks
,我也想退出應用程序。我想我應該使用clickedButtonAtIndex :.
1.有人可以幫助我嗎?
2.是viewDidLoad應用程序啓動時觸發alertView的最佳方法嗎?
3.是否有任何理由爲什麼現在我的應用程序需要更多時間才能開始構建和運行它?警報視圖 - 如何使用clickedButtonAtIndex:
-(void)viewDidLoad {
UIAlertView *disclaimer = [[UIAlertView alloc] initWithTitle: @"DISCLAIMER" message:@"This Application is provided without any express or implied warranty. Errors or omissions in either the software or the data are not guaranteed against. The application is not intented to replace official documentation or operational procedure. In no event shal the developer be held liable for any direct or indirect damages arising from the use of this application" delegate:self cancelButtonTitle:@"No, thanks" otherButtonTitles:@"Accept", nil];
[disclaimer show];
[disclaimer release];
[super viewDidLoad];
}
哪兒我必須之前或之後}插入此代碼.... ???我已經把委託,但在這種情況下,我不得不把這樣的事情:disclaimer.delegate = self; ???如果用戶按「不,謝謝」,我需要使用哪種方法退出應用程序? – mat 2011-06-01 10:07:27
後}毫無疑問。記住這是一個單獨的方法。 :) – visakh7 2011-06-01 10:08:37