I've defined a constraint in IB as shown below. How can I programmatically animate changing the "Second Item" in this constraint to a different object (effectively moving the first item up the screen).
Here's the code I've tried - where "categoryTableViewTop" is the NSLayoutConstraint. I get the error "Cannot assign to the result of this expression".
func expandCategory(button: UIButton) {
tableView2.animateWithDuration(0.5, animations: {
categoryTableViewTop.secondItem = categoryHeader.top
})
}