您的位置:首页 > 产品设计 > UI/UE

iphone 弹出表单UIActionSheet的应用。

2011-08-31 13:48 381 查看
UIActionSheet用于让用户在多个选项之间进行选择。操作表从底部弹出。


继承UIActionSheetDelegate

。按下按钮弹出表单
#pragma mark -
#pragma mark Btn press

-(void)photoBtnPress{
UIActionSheet *actionSheet = [[UIActionSheet
alloc]
initWithTitle:@"表单标题"
delegate:self
cancelButtonTitle:@"取消"
destructiveButtonTitle:@"元素1"
otherButtonTitles:@"元素2",@"元素3",
nil];

[actionSheet
showInView:self.view];
[actionSheet
release];
}

。表单回调
#pragma mark -
#pragma mark UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSLog(@"buttonIndex: %d",
buttonIndex);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: