How to hide the extra cell from UITabbar More menu iphone?

I have UITabBarController with 6 tabs. Now, the last 2 screens(tabbar items) are added in More Tabitem. There, it is in UITableview cells, first two rows have two tabbar items(2 screens). Now, my problem is to hide the other cells(set separate color as white). How can i do this? Is it possible? Thanks in advance.

Answers


  UITableView *moreTableView = 
(UITableView *) [tabBarController.moreNavigationController topViewController] view] ;

will give you reference to the table that is used in moreNavigationController.

[moreTableView setSeparatorColor:[UIColor clearColor]]; 

will help you in setting set separator color.

and after this you may need to set cell's background color .(as when this separator color is white it will certainly hide the separator in-between the cells with data ;) ).

Thanks,


Thanks for your all answers. I have solved the problem with Mr.Ravin's answer.

UITableView *moreTableView = (UITableView *) [[musicTabBar.moreNavigationController topViewController] view];
        moreTableView.backgroundColor =  [UIColor colorWithRed:0.94 green:0.96 blue:0.96 alpha:1];
        [moreTableView setSeparatorColor:[UIColor clearColor]]; 

        for (UITableViewCell *cell in [moreTableView visibleCells]) 
        {
            cell.backgroundColor = [UIColor lightGrayColor];
        }

This code helped me to show only two rows and hide all other rows.

Thanks.


Need Your Help

Delphi XE7 and BDE TStoredProc trouble?

delphi firebird delphi-xe7 bde

I have to migrate an old Delphi 4/BDE/Firebird 1.5. As a first step, I would like to convert it under Delphi XE7/BDE/Firebird 1.5. When all or most of migration bugs will be corrected I'll update

Compiling java.exe on Windows using Visual Studio?

java windows jni

The C source for java.exe is included in the JDK. Has anyone ever managed to compile this code to an executable on Windows using Visual Studio?

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.