I want to remove corner radiuses - ios

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.

Related

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.

iOS Blank White Space at bottom of viewcontroller

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.

XCode 6.3.2 View is not shown in storyboard

I have a simple view controller that have a UIImageview as background view.I add it from storyboard. It is shown well before.
But,I open this project today and find that the imageView just disappear in storyboard.
I also notice that the imageview become gray in here
Thanks
The answer
I setup this project in one size class but I see it in other.
Select the hidden view from the right panel (the one with Stars name), go to the attribute inspector and check if the view is installed in the current size class.

Retrieving Storyboard element that is outside of the frame

I'm working with an xcode storyboard. I was resizing a label and it pushed a UIImage outside of the frame, so I can no longer see it. I can't grab it. How do I move it back on the frame so I can see it?
I can verify that it is in my tableview cell, because it is still listed under the content view on the left bar.
Thanks
You can also select the element from you view controller scene from the document outline (on the left) and move it around with your keyboard arrow keys (double click so it's grey and not blue, if it's blue you will navigate the scene). I use the arrow keys most often to position my elements relative to each other. Holding the option key while moving the mouse to different elements gives alignment and distance guidelines to other objects while you move with the arrow keys.
On the left side of the storyboard, expand the elements for your UITableViewCell. You should see the UImage listed. Click on it, then go into the right menu and change the x,y coordinates. It'll now put it back to where you can see it and edit it.
Also just be careful about having your UIImage object as the bottom layer. I've hidden things from myself when they were accidentally put as the bottom layer.
There is a better way for Xcode 10 and above:
Navigate to the storyboard
Choose the controller of the controller scene you want to see the element of
Under size inspector, select 'Freeform' from the Simulated size dropdown
Increase the width/height and hit return.
After you have laid out all elements in the canvas and no longer want to see elements which are outside of frame, revert back to 'Fixed' simulated size under Size inspector.

Forward Navigation Arrow Button With Text in iOS

I would like to know how to place a right navigation arrow button on the navigation bar, and display it with text, just like it is the Apple Music and Apple Podcast apps:
So, as Sen briefly described, you want to drag a UIView into your navigation bar in your UIViewController in Xcode's storyboard (it will automatically get wrapped into a Navigation Bar Item when you drag it in). Then, change the UIView's class to UIControl (this will allow you to put a tap gesture recognizer in it later, but it acts like a UIView for now).
Now add two things to the view (control): UILabel and UIImageView. Type whatever you want into the label and give it the desired size, etc. Now, for the UIImageView, you'll have to drag the arrow image (link below) into your project in Xcode. You can literally just download the image, drag it onto the project source code explorer panel in Xcode, make sure that the option for copying the image in if needed is checked, and then click "OK".
Now, click on your UIImageView in the storyboard and choose the image you just dragged into Xcode as the UIImageView's image (it's name should appear automatically in the drop down box if you dragged the image into Xcode correctly; and the image drop down box can be found on the right side panel in Xcode if you have the UIImageView selected in the storyboard). In order to make the arrow look like Apple's, set it's size to about 35 x 35.
Now, all you need to do is drag a Tap Gesture Recognizer onto your UIControl, and then control+drag from the tap gesture (which is in your storyboard document outline) into your view controller's source code. This will make a method in which you can add code to segue. For example:
- (IBAction)forwardButtonClicked:(id)sender {
[self.navigationController pushViewController:self.someViewController animated:YES];
}
Now it's all hooked up!
Hope this isn't too confusing. Let me know if you have any questions.
Here's the link to the image: https://www.iconfinder.com/icons/211688/arrow_forward_icon#size=512 (You can just download it as a .png with the button at the bottom of the web page).
In order to make it blue like Apple's back arrow, I did the following:
I opened the downloaded image in a photo editor (such as GIMP)
I took a screen shot of Apple's default back button arrow (use cmd+shift+4 to take a screen shot while the simulator is open).
I opened the screen shot in the photo editor.
I used the color selector tool and chose the color of Apple's arrow.
I used the paint bucket and filled in the color of my arrow image.
I exported my blue arrow image as a .png (and now you can just drag this .png into Xcode like I mentioned before).

Resources