[英]How to display the tableview in dropdown list on Button Click in iPhone?
我已经尝试过此代码。 http://www.mediafire.com/download/bvoqrkn82sd6az9/tablesample.zip ..在这里,我需要这样。每当我单击显示按钮时,它应该显示Tableview的列表,如下拉菜单所示。 加载时,表视图应被隐藏。 在单击按钮时,应显示表格视图。 非常感谢您的帮助。 提前致谢。
您可以使用动画更改tableView的高度。 根据您的适合性设置时间。
扩展:
[UIView animateWithDuration:1
delay:0.0
options: UIViewAnimationYourChoice
animations:^{
CGRect frame = self.tableView.frame;
frame.size.height = 300;
self.tableView.frame = frame;
}
completion:^(BOOL finished){
NSLog(@"Done!");
}];
对于缩小:
[UIView animateWithDuration:1
delay:0.0
options: UIViewAnimationYourChoice
animations:^{
CGRect frame = self.tableView.frame;
frame.size.height = 0;
self.tableView.frame = frame;
}
completion:^(BOOL finished){
NSLog(@"Done!");
}];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.