-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
self.label.text = @"Destructive Button Clicked";
} else if (buttonIndex == 1) {
self.label.text = @"Other Button 1 Clicked";
} else if (buttonIndex == 2) {
self.label.text = @"Other Button 2 Clicked";
} else if (buttonIndex == 3) {
self.label.text = @"Cancel Button Clicked";
}
/**
* OR use the following switch statement
* Suggested by Colin =)
*/
/*
switch (buttonIndex) {
case 0:
self.label.text = @"Destructive Button Clicked";
break;
case 1:
self.label.text = @"Other Button 1 Clicked";
break;
case 2:
//???????????
self.label.text = @"Other Button 2 Clicked"; <<<<<< WHAT DO I PUT HERE???***
//???????????
break;
case 3:
self.label.text = @"Cancel Button Clicked";
break;
}
*/
}
我在上面写着什么的地方放了什么self.label
?我需要让其中一个按钮转到另一个页面。换句话说,如果我说“是”、“我想继续”并单击“继续”,它将带我进入另一个故事板。
编辑:看看上面写着“我在这里放什么”的部分,那是我想知道要输入什么代码的地方,这样我就可以做我想做的了?