I have a tab bar app which has 3 tabs(News, Account, Map)
Account tab has a table view containing 3 cells(Id Card, Meal Plan, Academics),
Clicking on Id Card cell brings another view which displays an id card.
Lets look at the two classes associated with the parent(Account), child(Id Card) view.
StudentAccountController - This class brings the table view for the account tab and the cells associated with the view.
StudentIdController - This class brings the Id Card view.
In the RowSelected() method of Delegate class of StudentAccountController, the StudentIdController is dynamically loaded.
Here we just need to set HidesBottomBarWhenPushed property of the child view to true.
public override void RowSelected (UITableView tableView, NSIndexPath indexPath) { if(indexPath.Row == (int)itemIndex.IdCard) { StudentIdModalView studentIdVC = new StudentIdModalView(); studentIdVC.HidesBottomBarWhenPushed = true; studentController.NavigationController.PushViewController(studentIdVC, true); } }
Hello,
ReplyDeleteI have a problem with hiding tabBar.
I'm not using navigation controller, but have just tabBar controller with items. When I set hidesBottomBarWhenPushed to one of my controllers, nothing happens when I press that tab.
Is it possible to use hidesBottomBarWhenPushed just with tabBar controller
Thank you in advance.
Cheers,
Daniel
Daniel,
ReplyDeleteHow do you the get back to the tabs if you hide the tabbar controller when pushing one of the tabs? I'm not sure I follow your question.
Do you have some sample code? I can take a look at it and suggest some solution.
thanks for this post, it was very helpful
ReplyDeletei didn't get this is which type of control?
ReplyDeleteplease reply soon
StudentIdModalView
I wrote the code like you suggested,but it shows object reference null?
ReplyDeleteplease help me
Kishore,
ReplyDeleteCan you send me the code you have written? This is a tab bar controller.