Xcode back button missing - swift

I appear to have a problem in Xcode. On my storyboard it shows a back button, but when run in the simulator, not only does the back button not appear, the entire navigation bar is missing.
Can anyone offer any common issues which may cause this?

It could very possibly we that you do not have your constraints properly set. This can be done in the view controller editor menu. It is in the bottom right hand corner.

Related

Swift navigation bar animation issue

I am at a loss with what is potentially a simple fix.
I have a basic ViewController with a UINavigationController, and a UISearchBar embedded.
Basic view layout
When I PUSH a new UIViewController onto the Nav - I get a brief animation issue where a black background appears, and also the cancel button doesn't disappear.
Animation glitch
It's only brief, but annoying enough.
When I return back using the back button, the search bar reverts to white, and then switches to red.
Back display issue
I wondered if I had configured something wrong, so I created a fresh project and left everything with the defaults. Yet I get the same issue.
Stripped back and the same issue
I'm using xCode 9.3 - with swift 4.1
Any ideas?
Check the extendedLayout settings of your view controllers (these can be set in code or in the storyboard editor). They need to be the same for both view controllers or you'll get this animation glitch.
In your case the problem might be the embedded search bar. It seems to be present only for one of the view controllers. You've got navigation bars with two different heights because of that. The framework doesn't respond well to that...

iOS7 Vs iOS8 auto layout and webview issue

I have a view controller that is composed of a web view and a toolbar with some basic controls. The toolbar is pinned to the bottom of the screen using auto layout. It has four constraints, to pin it to the left side of the screen, the right side of the screen, the bottom of the screen and another that pins the bottom of the web view to the top of the toolbar.
I am having too issues with this. The first is that the web view when loading a URL has a black bar running across the bottom of the screen for a second or two while the page loads, see attached screen shot. This occurs on both iOS7 & iOS8.
[EDIT]
This bug and the one below are related I think. I just discovered that the horizontal indicator when scrolling displays not at the bottom of the screen but higher up, where it would appear if the tabbar where present.
[/EDIT]
The second issue I am having with iOS7. The screen that calls this screen is the typical navigation bar inside a tab bar setup. The user presses a button to go to a particular page, the browser gets created and pushed onto the navigation bar stack. It hides the tab bar when created. In iOS8 this works perfectly, the toolbar is pinned to the bottom of the screen. In iOS7 the tab bar is removed but the toolbar is placed as if the tab bar was still present?! Any ideas how to fix these two issues? Many thanks.
FYI - Xcode 6.1.1
The "black bar" is most likely your app window background. At the time of loading the web view is still under the navigation bar. Perhaps the constraints are being overridden. Check your storyboard settings:
If this is it, it might solve the second issue as well.
Speculation
The reason iOS 8 works is because from Apple talks I gleaned they realise many dev had issues with their views being under the nav bars by default. Introduced with iOS 7. They likely changed this in iOS 8 but found no written evidence. If someone can confirm or deny this, I'll update the answer.

SWRevealViewController and Tab Bar Controller

I'm trying to develop my first app. I recognize this is probably an easy problem (and that i'm likely not stating my question clearly) so any help is more than appreciated.
I've got a storyboard that uses SWRevealController. The sw_rear panel that gets swiped out from the side has a few options in table form. One of the options is connected to a UITabBarController. There are three tabs. The implementation file for each of the 3 views has
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
to allow me to do a pan gesture to bring back the sw_rear panel.
When I compile, everything works well the first time. i can go to tab 1 and swipe and the panel appears. i go to tab 2 and swipe and the panel appears. but then, if i go back to panel 1 and swipe....nothing!
Any ideas how to fix this problem?
Thanks,
Rich
Add this code [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer]; in viewWillAppear Method

UIToolBar missing due to iPhone Message Compose Screen within the app

Something going wrong badly due to Message Compose Screen.
I am working on a TabBar based application. In some screens I am showing ToolBar instead of tabBar by setting hidesBottomBarWhenPushed = YES; and its working fine everytime. But In 1 screen I am sending SMS by opening Message Compose Screen within the iphone App. So problem occurs if I open Message Compose Screen and i clicked Cancel button of Message Screen.
So, whenever going back to that module where I was showing ToolBar. So on click of button no ToolBar. Totally blank, no toolbar and no tabbar (tabbar is quite obvious i have already set hidesBottomBarWhenPushed).. But why toolbar now showing due to Compose screen ?
There is no link with compose screen to this screen. Far different implementation and different controllers.
I have check by debugging, Toolbar frame is also fine.
Please help
Issue fixed... had problem with adding it to keyframe window
I think it is because the MFMessageComposeViewController has got a navigation bar. Your application should be a navigation based application for that. Otherwise your toolbar's frame position will be affected. I had this kind of problem once. So i changed the application into navigation based but hid the navigation controller.
Hope this might help you,
Happy coding!

UITabBarItem does not register click on the icon

I have four UITabBarItem's. Each has a label and custom icon. My AppDelegate uses the UITabBarDelegate protocol and every click on a tabbaritem is logged to the console so I can see what is happening.
The only way to select a tabbaritem is to click on the label. If I click anywhere else on the button area, including the icon, nothing happens at all.
Have you come across anything similar?
Well, I found the issue. Whenever a tab was clicked and a new view was programatically inserted, that view was placed on top of the tabbar, but since it's background was transparent I could not see it. So half of the tab bar was covered by another view. By making sure to bringSubviewToFront: the problem could be solved. Thank you everyone who tried to help.