2012-05-21 46 views
1

我有一個表視圖。當用戶單擊tableView的任何單元格時,我想同時顯示UIAlertView和UIActionSheet。 AlertView應顯示在ActionSheet上方。如果用戶單擊AlertView中的「取消」按鈕,則UIActionSheet和U​​IAlertView都應同時消失。我怎樣才能做到這一點?iPhone UIAlertView UIActionSheet表查看

回答

1

關注這個: -

UIActionSheet *actionSheetTitleFontStyle = [[UIActionSheet alloc] initWithTitle:@"\n\n\n\n\n\n\n\n" delegate:self cancelButtonTitle:@"ok"  destructiveButtonTitle:nil otherButtonTitles:nil]; 
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello" message:@"Hello" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; 
[actionSheetTitleFontStyle addSubview:alert]; 
[alert show]; 

它可以幫助周到,謝謝:)