点击按钮时,我想弹出一个底部的视图表格,就像这样!
http://i40.tinypic.com/2lapxdi.png http://i40.tinypic.com/2lapxdi.png
欢迎任何帮助,谢谢。
答案 0 :(得分:1)
使用presentModalViewController:animated:
方法。有关其使用的详细信息,请参阅文档。
答案 1 :(得分:1)
如果您想要重现您链接的屏幕截图中显示的内容,您还可以将选择器放在UIActionSheet中,如下所示:
UIActionSheet datePickerSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Select Date",@"Selecte Date")
delegate:self
cancelButtonTitle:NSLocalizedString(@"Done",@"Done")
destructiveButtonTitle:NSLocalizedString(@"Cancel",@"Cancel")
otherButtonTitles:nil];
// Add the picker
datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0,185,0,0)];
[datePicker addTarget:self action:@selector(dateDidChange) forControlEvents:UIControlEventValueChanged];
[datePickerSheet addSubview:datePicker];
[datePickerSheet showInView:self.view];
[datePickerSheet setBounds:CGRectMake(0,0,320, 700)];
[datePicker release];
[datePickerSheet release];