UITabbar disappears when clicked on a button - objective-c

I use UITabBar in my application. In one of my tabbars, i have a UITableView in a UIViewController whose root view controller is a Navigation Controller. When i click on a cell, i go to my custom edit mode which is a UIViewController.
In my edit mode I have a backButton that shows me UIViewController with the TableView.
My problem is when i click backButton, my TabBar disappears.
Do you have any ideas why my TabBar disappears?
Thanks.

In back button click, add the following code.
[self.navigationController popViewControllerAnimated:YES];

Related

Edit Button in UITableViewController when in Popover

I'm displaying a UITableViewController inside a popover. Everything works fine. Now I want that little "Edit" Button on the top right to reorder the cells. But unfortunately I can't achieve this.
I have implemented the 2 delegete methods for reordering, and in my tableviewcontroller I call this on viewdidloead
[self setEditing:YES];
self.navigationItem.rightBarButtonItem = self.editButtonItem;
but for some reason I can't see the navigation bar on top that should display the edit button.
what am I doing wrong?
thx in advance
you can create your UITableViewController in the same way you did it now, embed it in an UINavigationController using – initWithRootViewController: and show the navigation controller in the popover

hide navigationbar of uisearchdisplaycontroller when other viewcontroller is pushed

i have a uitableviewcontroller with uisearchdisplay controller. tapping on table cell pushes another view with some content and hides the navigationbar in the pushed view controller. the view controller has it's own uitoolbar, so far everything ok. the problem is that when a search result is shown and then tapping on the table cell view pushes the viewcontroller with uitoolbar with a navigation bar above it. so two bars on the pushed view. i dont want the navigation bar to be hidden. this code works if the viewcontroller is not pushed from search result
[self.navigationController setNavigationBarHidden:YES animated:YES];
what i'm missing using uisearchdisplay controller and hiding its navigation bar when other view is pushed?
I have redesigned my app. i dont use uisearchdisplay controller. instead i use uisearchbar and tableview which works perfectly.

storyboard segue modal can't have back button?

So we built a bar button inside a popover and used a modal segue linked to a UIViewController in storyboard. However, there is not back button. How can we build a back button?

ios sdk only one view changes at a time bug

I'm pushing a number of views:
the top one is a UITabBarController
the second one is a UINavigationController with a pushed view
the third one is a modal box.
Once the close button in the modalbox is pressed I'm trying to revert everything to the default state and change the tabbar index.
[self dismissModalViewControllerAnimated:YES];
[self.navigationController popViewControllerAnimated:NO];
[self.tabBarController setSelectedIndex:3];
This dismisses the modal view but doesn't do anything else. Any ideas what could be wrong? I read something about a possible ios bug but I don't know how to work around it.
Neither UITabBarController nor UINavigationController is a view. Both are subclasses of UIViewController and have a property NSArray *viewControllers.
If you have an actualView controlled by an ActualViewController that is pushed on top of a rootView controlled by a RootViewController that is the rootViewController for the navigationController, and you also have a modalView controlled by a ModalViewController, then put
[self dismissModalViewControllerAnimated:YES];
in ModalViewController.m, and put
[self.navigationController popViewControllerAnimated:NO];
in ActualViewController.m (from whence modalView is pushed, presumably), and put
[self.tabBarController setSelectedIndex:3];
in RootViewController.m (from whence actualView is pushed, presumably).
If modalViewController was never added to the navigationController, then it doesn't know that the navigationController exists.
If actualViewController was never added to the tabBarController, then it doesn't know that the tabBarController exists.
The easy (and dirty) way:
Dismiss the modal view in the modal view. Make the navigation view controller the delegate of the modal view. Make the tabbar controller the delegate of the navigation controller. When the button is pressed call a method in the navigation controller that pops the view and calls a method of the tabbar controller which changes the selected tab.

keyboard not appearing when uitextfield is pressed

I have presented a navigation controller (Nav1) as modal view controller from rootViewController
Then from Nav1 i created another navigation controller (Nav2) and presented it as modal view controller.
In nav2 when i click a table cell it pushes a view controller containing UITextField
Now the problem is when I click on UITextField it does not show iphone keyboard
Actually I am trying to make something like alarm label as in iphone clock app.
Just be sure for you have set the delegate the textfield...
[textField setDelegate:self];
why did you choose two nav controllers?
you can use tabbarcontroller by the way there is much more simpler way to achieve this.Search on google
check if
"reloadData"
is not executing before the UITextField becomes active