I\'m creating an autolayout-friendly split view class for one of my applications. Among its various features is that it can collapse panes, and can animate their collapse, much
I agree, this is pretty strange, and could well be a bug. I'd definitely report it as such because, to the best of my knowledge, this should work.
I was able to get it to work by using the NSAnimationContext
class method +runAnimationGroup:completionHandler:
instead of the beginGrouping
and endGrouping
statements:
[NSAnimationContext runAnimationGroup:^(NSAnimationContext* context){
[constraint.animator setConstant:self.width];
} completionHandler:^(void){
[theView removeConstraint:constraint];
NSLog(@"completed");
}];