I have tried this code. http://www.mediafire.com/download/bvoqrkn82sd6az9/tablesample.zip ..Here, I need like this.. whenever I click the show button, it should display the list of Tableview like dropdown as it is in this screenshot. When on load, table view should be hidden. When on click the button, tableview should display. Your help is highly appreciated. Thanks in advance.
Asked
Active
Viewed 1,425 times
1

Dinesh Kumar
- 1,173
- 7
- 19
- 30
-
Refer to this https://github.com/satishazad/SAMenuDropDown – Satish Azad Oct 30 '13 at 17:40
-
This is what you need...Refer this link http://stackoverflow.com/questions/19628214/how-to-show-the-tableview-like-dropdown-on-button-click-in-iphone Hope it will solve your answer! – Oct 28 '13 at 11:24
1 Answers
5
You can change height of tableView with animation. Set time according your suitability.
For Expansion:
[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!");
}];
For shrinking:
[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!");
}];

Krishna Kumar
- 1,652
- 9
- 17