All Questions
Tagged with swift constraints
1,252
questions
0
votes
0
answers
27
views
How to increase nested TableView's Height in Swift iOS?
I have the main TableView which cell contains another TableView and this TableView's cell also contains another TableView.
This is the response I'm getting from the backend:
{
"data": [
...
0
votes
1
answer
17
views
Swift UIKit ordering and positioning with constraints inside a custom table cell [duplicate]
I have a custom table cell, and all I want to do is insert two button images inside it. This is my code:
gb = UIButton()
gb.setImage(UIImage(named: "skejt_zelena_polutka"), for: .normal)
gb....
0
votes
1
answer
41
views
How to solve constraints issue: Position is ambiguous for UIButton?
I have placed UIButton to right view of textfield. But I see the below warning
My code for UIButton:
private lazy var myButton : UIButton = {
let button = UIButton()
var config = UIButton....
0
votes
2
answers
130
views
How to dynamically controls constraint to active them without manually doing calculation and set active by my self?
I want the text label adjust its position based on the green view.
It should left alignment to the view if possible, but if the text content extent out of the dashboard, I'd like the text to right ...
0
votes
1
answer
17
views
Show "tutorial" over UITabBarViewController with constraints in Swift?
An example of tutorial I need:
It is MYPassthrough library.
The problem is it works with frames only but I need constraints (to bind to appropriate views directly without of frame calculations)
Tried ...
0
votes
1
answer
59
views
Set Different Constraint in StackView
Q. How to make different constraint each views, in stackview, UIKit?
I want to make screen like captured one.
In below code, the result is ok. but
I have errors Unable to simultaneously satisfy ...
0
votes
0
answers
25
views
How to make child to parent view anchor in snap?
I am trying to make a child view exactly the same size as its parent like this code:
content.translatesAutoresizingMaskIntoConstraints = false
content.centerXAnchor.constraint(equalTo: baseBackground....
0
votes
1
answer
33
views
How to click cell change height in tableView other controller?
2023-09-20 09:57:39.883571+0700 Dokobit[5279:68007] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don'...
0
votes
2
answers
37
views
Unable to change collectionview cell background colour in Swift
I have given constraints for image and label like this
Image constraints. Label Constraints
code: with this code i am able to get selectedNamesArray but unable to change cell colour. where am i wrong? ...
1
vote
1
answer
71
views
Make UIView stretch vertically until a certain margin
I have a UIView where the content might overflow vertically, I set a vertical constraint (a height constraint, but top/bottom constraints have the same effect) to prevent the whole view (the pop up) ...
-1
votes
1
answer
39
views
Cell content constraints programmatically
I am trying to redo my project programmatically with no storyboard. I have a tableView with a prototype cell.
The cell contains an imageView (briefcase), firstLabel (at the top) and secondLabel (right ...
0
votes
2
answers
140
views
How To Expand UITableViewCell's UILabel's Background Property When Text Is Being Generated?
I cannot get my label's background property to properly expand/grow with the text as it is being inputted into the label.
I've made a UITableView with a custom cell. This custom cell's file is a .xib ...
0
votes
0
answers
75
views
Unable to simultaneously satisfy constraints when adding UITabBarController into UIView
I programmatically add UITabBarController into UIView. That causes console warnings I can't understand and remove. Despite that, in simulator everything is placed as desired.
final class ...
0
votes
1
answer
47
views
Trying to center a rotated label inside a background image
I have the following code:
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Create the background image view
...
0
votes
2
answers
224
views
Autolayout constraints push content outside of the view
This question is being updated every time I act on someone's suggestion here. Unfortunately though, non of the minor housekeeping suggestions helped enough, so the problem remains.
In the nutshell:
I ...