MonoMac에서 작업 중이며 버튼 클릭시 컨트롤의 너비와 높이 제한을 동적으로 애니메이션으로 적용하려고합니다. 다음 페이지를 읽은 후에는 제약 조건의 Animator 프록시를 사용해야한다고 가정합니다. 그러나 다음 코드는 작업을 완료하지 못하는 것 같습니다. NSLayoutConstraint animation on MonoMac
NSLayoutConstraint.constant ignoring animation
http://cocoa-mono.org/archives/235/using-animator-with-frameorigin/번호 :
// makes sure we animate from 0 to calculated width
double newWidth = ...
widthConstraint.Constant = 0;
var animation = new NSAnimation() { Duration = 0.5, AnimationCurve = NSAnimationCurve.EaseInOut };
widthConstraint.Animations = new NSDictionary("constant", animation);
((NSLayoutConstraint)widthConstraint.Animator).Constant = newWidth;
이것의 결과는 제어 newWidth
의 폭을 갖고 있지만, 애니메이션되지 않는다 - 그것은 즉시 변경한다.