[英]In iOS 7, how do I change the color of the options in my UIActionSheet?
[英]If I bring up a UIActionSheet, how do I make one of the options segue to a new view?
我真的不知道該怎么做。 我創建了UIActionSheet
,當我點擊一個按鈕時會出現它,但是我希望在為該應用選擇了某個選項以將其選擇到新的視圖控制器時出現。
您在UIActionSheetDelegate方法中調用(當用戶點擊按鈕時) [self performSegueWithIdentifyer:@"segue_id"];
使用UIActionSheet
Delegate
方法( – actionSheet:clickedButtonAtIndex:)
#pragma mark - UIActionSheet Delegate Methods
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex == 0)
{
// code for Button 1
}
if(buttonIndex == 1)
{
// code for Button 2
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.