I want to make a button to active and deactivate a constraint but my problem is when i enable->disable->enable it, I get a fatal error.
Here is my code:
@IBOutlet weak var heightEmail: NSLayoutConstraint!
if alamatDomisiliSegmentedControl.selectedSegmentIndex == 1 {
heightEmail.isActive=true
heightEmail.constant=8
print("tidak")
} else if alamatDomisiliSegmentedControl.selectedSegmentIndex == 0 {
heightEmail.isActive=false
print("ya")
}