I have a Bottom Layout vertical space Constraint with size class variation for iPad and iPod. Please check the attached image
iPad = 62
iPod = 0.
Trying to access the Constraint value in the viewcontroller by IBOutlet reference.
Single constraint with different size class values for iPad and iPod as
Constant = 62
wC hR = 0.
I dont want to create two different constraints for iPad and iPod as I prefer single IBOutlet with different size class values.
But unable to read the size class values from NSLayoutConstraint, only getting constant value.
IBOutlet weak var stackViewBottomConstraint: NSLayoutConstraint!
var bottomHeight = stackViewBottomConstraint.constant
print("bottomHeight:\(bottomHeight)")
//bottomHeight: 62 - iPad
//bottomHeight: 62 - even for iPod
How to access the size class value of the constraint in the right way?