UI StackView¶
Implementation¶
Programmatically¶
Article¶
Custom UI Elements on StackView
Documentation¶
Debug¶
Errors:
```libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to activate constraint with anchors
Constraint common view hierarchy error.
## UIView Events
If you're embeding UIstackView in a UIView class and are not able to get some event responses, you need disable its user interaction flag.
```swift
class CustomView: UIButton {
init() {
super.init(frame: .zero)
labelStackView.addArrangedSubviews(titleStackView, descriptionLabel)
addSubview(labelStackView)
}
private(set) var labelStackView: UIStackView = {
stackView.isUserInteractionEnabled = false
}