[英]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.