UITableView with single row display - How to move another row to display area with animation?

I want to make a menu for my app like bottom menu of Camera+ app in itunes: http://itunes.apple.com/us/app/id329670577?mt=8 (pic 2). This is a review, at 5 minutes 17 seconds : http://www.youtube.com/watch?v=ZNJzhyb7mNI#t=5m17s

I custom UITableViewCell to make a row contain array of buttons with horizontal scroll. Then I create a UITableView with custom UITableViewCell for menus. My question: How to change another row to visible area with animation like menu of Camera+. Thank you!

Answers


My Solution: I create 1 NSArray* to contain current menu name is: menuDataSource. menuDataSource only contain current menu.

-(UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
{
return [menuDataSource objectAtIndex:0];

}

When user change menu, I recreate menuDataSource with new menu:

[internalTableView beginUpdates];
currentHorizonMenu = [[self.reusableCells objectAtIndex:menuIndex]retain];
menuDataSource = [NSMutableArray array];
[internalTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationTop];
[menuDataSource addObject:currentHorizonMenu];
[internalTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationBottom];        
[internalTableView endUpdates];

self.reusableCells is NSArray* contain all menus


Need Your Help

Return Maximum value from an Associative Array (Object)

javascript max

I have an associative array which looks like:

How to set up already consistent data for Google App Engine unit tests?

java unit-testing google-app-engine google-cloud-endpoints

I know that App Engine datastore queries are only eventually consistent. However, for some of my tests, I would like to seed the datastore with already consistent data (i.e. it was saved a long time

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.