나는 다음과 같은 코드를 사용하여 내 사용자 지정보기의 움직임을 애니메이션하기 위해 노력하고있어 (사과에서 목표 - C에서 최선 번역을 자신의 문서)나는 사용자 지정보기
var animDict = new NSMutableDictionary();
animDict [NSViewAnimation.TargetKey] = this.View;
animDict [NSViewAnimation.StartFrameKey] = NSValue.FromRectangleF (this.View.Frame);
animDict [NSViewAnimation.EndFrameKey] = NSValue.FromRectangleF (new RectangleF (0, 150 * index, 400, 150));
var theAnim = new NSViewAnimation();
theAnim.SetValuesForKeysWithDictionary (animDict);
theAnim.Duration = 2;
theAnim.StartAnimation();
를하지만 애니메이션 할 수 없습니다 앱을 실행할 때 다음 런타임 오류가 발생합니다. 2011-05-08 00 : 53 : 30.827 EpisodeNext [61715 : 613] [setValue : forUndefinedKey :] :이 클래스는 키 NSViewAnimationTargetKey에 대해 키 값 코딩을 준수하지 않습니다.
내가 뭘 잘못하고 있는지 아는 사람이 있습니까? 고맙습니다!
Unfortuanettly 난 다음 얻을 일을 : 오류 CS1503을 : 인수를'# 1 '변환 할 수 없습니다'MonoMac.Foundation.NSMutableDictionary '표현'MonoMac.Foundation.NSCoder '를 입력 (단순히 SetValuesForKeysWithDictionary 방법을 제거하고 넣어 NSViewAnimation 생성자의 animDict ...) –
"var theAnim = new NSViewAnimation (새 NSMutableDictionary [] {animDict}));" ? –
그게 효과가 ... 아주 이상한 구문 (내 생각에) –