Constraints not update swift [closed] - swift

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Hello,
I am having trouble with constraints and was hoping for a little guidance.
In the image attached.
1 = What I start out with. The red section is a table view, the blue is a button.
2 = What is happening.
3 = What I want to happen.
I have an autolayout constraint from blue to red. But sometimes the red section hides a section in it and gets smaller, but the blue area does not follow when this occurs.
Im just curious if I need to programmatically set another constraint on the blue area. OR like refresh the constraint somehow so it knows to move up to the red area.

The UITableView isn't actually getting smaller or larger. Even if it doesn't have a lot of content inside of it, the frame stays the same.
If you want the behavior in 3, you could put the button in it's own cell in the table. Then it would always be at the bottom of the rest of your cells.

Related

Unity2D Simulating height with Top Down Shadows [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
So the problem is the following:
I have been trying to make this flying simulator little phone game, the problem is i cant make the shadow change with a smooth transition...
That White squared is a cloud, and the objective is to have the shadow change size while in the cloud...
I don´t really know were to start, i tried shaders, but i´m not that good with that...
Thx :))
If you are not into shaders, I would look into Masks. Masks basically limit a sprite to only draw within it's boundaries.
In this example, you could have a mask on the cloud. To make it work, have the "nearer" shadow be always drawn, but only in the mask's boundaries (In this case - the cloud) Relevant Youtube Tutorial

cant get Image or Texture of UI.Image in Unity [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
m_Image = GetComponent<Image>();i am trying to put a list of images and whenever clicked i want to replace clicked image to a plain . as i am a beginner in unity please share your thoughts,,
As shown here the pen image should be replaced in the floor
I believe you should use
GetComponent<Image>().sprite
and set a sprite instead of an Image.
You should use Sprite instead of an image(sprite is a part of images components in unity)
GetComponent<Image>().sprite;
Read more about Sprites
Unity Manual

My storyboard is not edge to edge with the screen [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I'm adding an image but it won't go fullscreen with the iPhone XR, it has white space around it
I tried zooming it in and out for refreshing it, but still won't go fullscreen
I expect the image to go fullscreen
It sounds like you've aligned your image to the Safe Area guide rather than the view edge.
Safe Area guides are inset a bit on iPhone X/XR devices to allow space for the home indicator or the sensor housing (notch). If you want your view to fill the superview, make sure your layout constraints are attached to the superview edge rather than the Safe Area edge.
To fix this, edit your existing constraint from the storyboard, changing the item from Safe Area to Superview:

Please say about size inferred [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am fresher in Swift language. If I take the size of inferred instead of any other, it will effect in constraints? In which size I should do designing is there any proper method for constraints.
Inferred size means that the Storyboard infers the scene size according to its super-scene size (the parent's size).
If you have a scene that is the size of an iPad and then you add a new scene to your storyboard and create a segue to it, it will automatically resize to the same size as the iPad scene (where the segue originates from).
Freeform ignores the above rule and you're able to size the scene as you like, in the utility pane on the right.
This setting does not affect constraints, and how the view is displayed on actual devices. For that, you need to use AutoLayout and constraints.

iOS 7 dynamically change speech bubble color in messages [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Trying to figure out how to incorporate this effect into my app.
It is essentially the adjustment of the colors in the speech bubbles when the user scrolls, as seen in the messages app in iOS 7.
The bubbles close to the top of the screen are light blue, the bubbles towards the bottom are darker.
Create a gradient on your views. Set the start and end color's intensity according to the view's position in the scroll view's superview (using convertRect:toView:). As your scrollview scrolls, update the visible bubbles' background colors according to their current position. An optimization is to only update the views which are visible. Using a table or collection view can help you with that. It's a simple yet effective effect.