uistackview Questions

6

Solved

I am new to swift. I have added view to stackview using addArrangedSubview(). But I am not able to remove this view using removeArrangedSubview(). Even after removing arranged subView the view is ...
Obsolesce asked 5/1, 2017 at 11:16

4

Im attempting to add a UITapGesture to a UIStackView within a collectionView cell but each time I do my app crashes. (All IBOutlets are connected) This there something I'm doing wrong here? let f...
Muniments asked 12/5, 2016 at 17:35

12

Solved

I'm trying to add vertical lines, between labels inside a stack view all programatically. The desired finish will be something like this image: I can add the labels, all with the desired spacin...
Electrify asked 21/5, 2017 at 15:0

5

Solved

UIStackView is awesome, I love Equal Spacing Distribution. But how to achieve the same space also outside of elements dynamically? In my case all elements will have same ratio 1:1
Fou asked 27/3, 2017 at 11:40

3

Solved

Autolayout cannot figure out the height or vertical position of a UIStackView despite having added subviews. This is a pretty common error and "gotcha" so please see the answer below.
Beastings asked 1/8, 2017 at 4:24

6

Solved

I'm updating my app to use UIStackViews, now that most people should have updated to iOS 9. In the old version, I made a UIView consisting of two UITextFields and set its layer.cornerRadius prope...
Fastness asked 25/11, 2015 at 23:0

2

Solved

I've been switching over to UIStackView recently and trying to do all my layout with it and it's so much easier than using Auto Layout... with one exception. I have a layout using nested UIStackVi...
Lied asked 12/1, 2016 at 9:35

3

Solved

I'm using the UIStackView with the following configuration: let contentView = UIStackView() contentView.distribution = .EqualSpacing contentView.alignment = .Center contentView.spacing = horizonta...
Kooky asked 26/10, 2015 at 14:52

2

Solved

How is it possible to add a arranged subview in a particular index in a UIStackView? something like: stackView.addArrangedSubview(nibView, atIndex: index)
Tequila asked 23/12, 2015 at 11:2

3

I have a horizontal StackView with distribution as "fill equally". It has 3 labels. I want one of the labels to have dynamic height. When I set the number of number of lines to 0 for that label, i...
Slather asked 27/12, 2017 at 7:3

5

Solved

I would like to create a vertical stackview with 3 elements in it. I want a bit more space only between the 2nd and the last element. So I thought about adding to the last element : mylastelement...
Shelter asked 31/3, 2019 at 13:17

7

Solved

I have a complex view hierarchy, built in Interface Builder, with nested UIStackViews. I get "unsatisfiable constraints" notices every time I hide some of my inner stackviews. I've tracked it down ...
Knoxville asked 12/10, 2015 at 4:9

13

Solved

My app has 2 screens: TableViewVC (no stack views here) DetailVC (all the nested stack views here; please see link for picture: Nested StackViews Picture) -- Note, there are labels and images wi...
Artificer asked 11/11, 2015 at 1:41

6

Solved

I have a simple horizontal UIStackView with several UIViews stacked inside. My goal is to create variable spacing between views. I am well aware that I can create constant space between the subview...
Washtub asked 7/10, 2015 at 17:51

3

Solved

I want to put two views into a UIStackView. I want the top item to always be 30% of the space no matter what device (or orientation) that it appears. Thus, I want to have the bottom view to be 70%....
Emery asked 27/4, 2016 at 11:20

0

I've a stack view inside scroll view as shown in the image below. I want to align it vertically in center. It doesn't align vertically in center on iPhone 5S, it works fine on iPhone 11 Pro Max. I...
Proconsulate asked 15/5, 2020 at 23:21

2

Solved

The following code is an attempt to add a UIStackView to a view controller, pinned on all edges with a little margin, and add a label to it. I want the StackView to use .fillProportionally as its...
Optimism asked 8/5, 2020 at 13:1

4

Problem: App crashes when I attempt to remove subview. Context: I have a UICollectionViewCell that gets updated with a model object. I've tried putting these methods in prepareForReuse and/or the ...
Generative asked 9/12, 2016 at 6:24

1

I am working on an iOS app which display a UITableView of items. Each row will show a list of tags with different widths(given by the tag's text length). I can place all the tags in a horizontal U...
Dodecasyllable asked 7/3, 2020 at 20:56

5

I can't achieve a self sizing UITableViewCell with a UIStackView inside it. For the UITableViewCell I'm doing something like this: On code I'm doing this: override func viewDidLoad() { super....
Orthography asked 25/8, 2016 at 22:18

3

Solved

I have a horizontal UIStackView which has two UILabel in it. First UILabel is multiline (two line) and other one is one line only. They both have default content compression and resistance prioriti...
Highgrade asked 27/11, 2019 at 6:22

2

Solved

I have UIStackView and want add to this view some arranged views... sometimes one, sometimes two, three... etc. UIStackView has full width. I want arranged views to have the same width with alignme...
Fattal asked 9/6, 2017 at 12:5

1

I have a title label as defined below: private lazy var titleLabel: UILabel = { let label = UILabel() label.numberOfLines = 2 label.setContentCompressionResistancePriority(.init(rawValue: 999),...
Dap asked 15/11, 2019 at 5:59

3

I'm using Xcode 8 building for iOS 9 and using auto layout. Occasionally when I install a constraint in Interface Builder there's an immediate conflict. When I click the red disclosure and look at...
Cyndicyndia asked 14/10, 2016 at 17:53

3

I added my UITextView inside UIStackView. But my textview is not Multiline. Auto layout is shown as below: As per Image it is just taken 1 line. The textview frame shown as out of frame as pe...
Entablement asked 30/5, 2016 at 8:3

© 2022 - 2024 — McMap. All rights reserved.