Retrieving Storyboard element that is outside of the frame - ios

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.

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.

iphone X navigation display issue

I have two items on the navigation bar. named More on the left and Search on the right. When i run the app on the simulator, two items are moved to 2 top ears of the phone. see below for more detail. this is not happening on none iphone X
This is happening because your constraints are set to superview, not safe area (or not using safe area at all).
In your Storyboard, click on your ViewController, click on your view then go to the Size inspector.
There, make sure that your safe area layout guide is enabled. Then, just bind your view's edges to safe area instead of superview

How to make a tableview fill all the available space?

This is my first swift application, so apologize if it's very basic. I was unable to find it...
In my view, I've a Navigation on top (Navigation Controller) and It's using a TabBar Controller. I'd like to make the TableView fill the whole empty space no matter the size of the device nor orientation.
I set the property Content Mode to many different options, including Aspect Fill, but all the options can't cause any effect.
Any clue about it ?
First make your tableview completely fill the screen and then set the constraints to be in 0 margin from all sides, like in the image
use constraints for display full table view on empty space.enter image description here
Click on pin icon from bottom side of Xcode.
Select all for four(up,down,left,right) constraints and set 0 value for all.
after then click on add constraints button and refresh frame(click on right side button of Pin button and select Update Frame).

Text View keeps resizing/resetting to zero size and coordinates

In my iOS application storyboard i have a few view controllers which contain one or more TextViews. Now, on almost everything i do within those views, like adding another button, or resizing a text box, those Text Views 'jump' back to the upper left corner and at the same time they get resized to 0,0.
Is this a bug, or can i do something about it?
I'm using Xcode 6.1

Why does Interface Builder show hidden views through the views above them?

When nesting views in Interface Builder, if I have an opaque view with hidden views beneath it in the view Hierarchy, the hidden views are visible through the higher view and are just partially translucent like the below picture.
Why does this happen and can I make it stop? It's very annoying.
To be clear this is strictly in IB. At run time the views are displayed correctly.
Sad to see this is the best answer that I have found so far: If you set the view you want to work as NOT hidden, while all the rest ARE hidden, then you can select away from the storyboard (e.g. some other file), then click back on the storyboard. Only the NON-hidden views are displayed. Sadly, the other views comeback if you make position alterations to the view (UPDATE: only when you click and drag. Selecting and using arrow keys does not), but changing text, size, color etc do not.
Original with hidden
Clicked off storyboard and back

Resources