iOS7 Vs iOS8 auto layout and webview issue - iphone

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.

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...

Running Xcode Project on iPhone - Black Screen?

When I run my project on the iOS Simulator or on my iPhone, half of one particular view controller becomes a black screen. None of the functionality for that view controller is there, and half of the screen is black. However, the "Back" button at the top of the View Controller is still there, and it works. This View Controller should have a Table View and a UILabel. However, neither of those appear. Any ideas why this might be the case?
Thanks.

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!

Cocoa Touch: Why doesn't UINavigationController render 'Back' button?

When I push a view controller it animates properly and slides in, the only problem is that no 'Back' button is rendered up top.The back button is still there, I can still tap it, it just doesn't render on the screen.
This behavior is identical in both the simulator and on multiple devices.
Is this a known issue or bug? Using 3.1.3 of the iPhone SDK.
More information:
It renders it for further levels, just not on the second level of nav controller.
So Main Page (No back button - OK). Second level page (back button, but doesn't render - not OK). Third level page (Back button there and rendering - OK).
You won't have a back button if the previous view has no title.
Are you adding a second UINavigationController? (presumably by accident). If you have 2 nav controllers they will render the nav bar on top of each other, which could lead to what you are seeing.

How to present a modal view controller with fixed UIToolbar?

I am trying to set up a Modal View Controller, that that lies below a fixed toolbar. therefore the toolbar is supposed to stay on top while the modal view rolls in.
the Safari-App does that for example, when hitting the bookmarks-button. the toolbar stays, the buttons change..
I tried a couple of things like pushing the toolbar to the front and ended up not using the presentModalViewController method at all, and animating the new View manually into a subview instead. but that brought a couple of other issues along.
I'm not sure what you are saying, when you press add bookmark in safari, a new modal view shows with no tool bar. The navigation bar at the top is not a tool bar if that is what you mean. They are UIToolbarItem set into self.navigationItem.
All modal views I've seen are animated until they take up the whole of the screen. Those modal-like views that only scroll up to a certain point in some apps, are done by hand. Maybe you can cover those issues encountered when doing this by hand in another post?