Posts

Post not yet marked as solved
1 Replies
1.2k Views
I have a Bottom Layout vertical space Constraint with size class variation for iPad and iPod. Please check the attached imageiPad = 62iPod = 0.Trying to access the Constraint value in the viewcontroller by IBOutlet reference.Single constraint with different size class values for iPad and iPod asConstant = 62wC 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 iPodHow to access the size class value of the constraint in the right way?
Posted
by satyagap.
Last updated
.