iOS Blank White Space at bottom of viewcontroller - ios

A strange white space appears at the bottom of a viewcontroller sometimes it disappear.
White space hides a button at the bottom left.
Please, help me out, I've searched a lot only thing I came across is
self.automaticallyAdjustsScrollViewInsets = false;
But it's not working
Thanks

This can happen due to either of the two reasons
1. Another view is overlapping your view
2. Height for your view is not enough to contain all the contents and view.clipsToBounds is set to Yes.
View debugging option in Xcode can show you what is happening.
Reproduce the issue in simulator and press the 'debug view hierarchy' button in Xcode. Xcode will render a 3D model of the view hierarchy which you can view from any angle by moving the model around with mouse. Click on any point on the model and Xcode will tell you what view it is and you can identify the overlapping view.

Related

I want to remove corner radiuses

I'm developing iOS app with XCode.
My problem is a corner radius of UIViewController as below.
I want to remove it. It's shown on only iPhone7 simulator.
Please help me.
Get a reference to your UIView's layer and then call this function:
view.layer.cornerRadius = 0
It could be a couple of things:
Corner radius;
Background image that incorrectly had its corners rounded; or
Mask applied to the layer.
If you’re having trouble identifying the specific view that this has this applied, use the view debugger. So, run the app via Xcode and then tap on the view debugger button .
When your views appear in Xcode’s view debugger, rotate the view and select the culprit.
Once you’ve highlighted the view of interest, you can press shift+command+D, or choose “Navigate” » “Reveal in Debug Navigator” from the Xcode menu , and it will highlight the view in the view hierarchy shown on the left. Or if you choose the object inspector in the right panel, you can see the class name, and if it’s one of your classes, you can click on the little arrow to the right and you will be taken directly to your code.

White Bar appearing at bottom of each view controller in storyboard but doesn't affect when ran

In my storyboard view these white bars appeared at the bottom of every view. I can't remember what I did when they appeared, the only thing I can think of was that I tried to add a bar button but then deleted it, so maybe that created some sort of bar. However the bar doesn't show up when running the app in the simulator, it just has a visual in the storyboard.
Does anyone know what it is / why it appeared? and also how can I get rid of it. I got rid of a few by changing the view heights and then changing them back, but when trying to do the same in the first view when I clicked the white bar they all appeared again on every view.
Also, I've noticed some are within the view and some are an extension.
This issue is caused by adding a bar button item and then removing it. The fix is pretty easy though. Go to your storyboard and select the View Controller having the issue.
You will then want to go to the Utility area on the right side of your screen. You will see Bottom Bar = Translucent Toolbar. Change that to None and you're good to go.

Swift: Setting View on top of SceneView not working

I'm trying to set up a layout where a Map is placed on top of the SceneView. When the app builds, the set up flashes for a second, and then the SceneView takes up the whole screen, completely hiding the other two views.
After moving the SceneView on the left hand menu and moving it back, the text started appearing but not the black background.
(I've got constraints set for the Scene View to take up the whole screen, and some constraints (right and bottom) on the Map too.
Why is it not working?
EDIT: It started working after I deleted the view and added it back in, but not sure why. #El Tomato says SceneViews always overlaps other views. Is this true (i.e. by accidentally getting it to work, am I utilizing a bug)?
It is doable. I'm doing it currently with an app I am using, but the difference is that I didn't set up the ARSceneView in the Interface builder, but I added it to fit the whole screen programmatically. I have some buttons that were added through the interface builder, and I added a label with a background now just to make sure it works similarly to how you want it.
I will post some images:
Here i simply have the view controller with some (bad looking buttons) in the stack View as well as the label with a red background. The ARSceneView is added in the my ViewDidAppear function and takes up the whole frame.
This picture is from the screen while the app is executing (Debugging the UI). As you can see, the Label with the background as well as the buttons I've added all show.
I also have 2 buttons that are showing as well (the white and red circle) and these were added programmatically and were brought to the front.
My suggestion is to try and add the ARSceneView programmatically, maybe it doesn't work otherwise. Or you can try to outlet all your views and bring the Map View and the Label to the front using bringSubviewToFront.

Constraint issue with iPad using single storyboard iOS

I am having issues with a specific view on my storyboard. The button and textview don't show in the right place when using the ipad. It works perfect for the iPhone, however. I am using one storyboard for the both of them. (Not one each) Here is a screenshot for what it is showing and the blue rect is for where the textview should be and the red is for where the GPS button, which is visible to the left, should show. Any ideas? I have tried setting and reseting the constraints, but it has had zero effect.
Thanks

UITextView disappears from ViewController

I have the strangest thing happening. My Text Views and Image Views randomly become invisible on my View Controller.
I am developing using Xcode 6 on OSX 10.9
I have a View Controller that is wrapped in navigation controller.
In the middle of the View Controller I have Text View. When I add an Image View or move controls somehow the Text View disappears. It doesn't re-appear at run time. There doesn't seem to be overlap as far as I can find. On the left hand side the navigation shows that the text view is there and I can select it and edit properties.
Has anyone seen anything like this?
I recommend upgrading to Xcode 6, and using its new view debugging feature to locate your view. The issue could be with incorrect Auto Layout constraints, or some views overlapping one another, etc.

Resources