Expand/collapse NSSplitView subviews using CoreAnimation

danipendanipen USMember ✭✭
edited October 2017 in Xamarin.Mac

Hi there,

I'm trying to port the following code extracted from a SO post:

            NSMutableDictionary *expandMainAnimationDict = [NSMutableDictionary dictionaryWithCapacity:2];
            [expandMainAnimationDict setObject:self.mainView forKey:NSViewAnimationTargetKey];
            NSRect newMainFrame = self.mainView.frame;
            newMainFrame.size.width =  self.splitView.frame.size.width-lastInspectorWidth;
            [expandMainAnimationDict setObject:[NSValue valueWithRect:newMainFrame] forKey:NSViewAnimationEndFrameKey];

In the example, they add a NSRect in the NSMutableDictionary to perform the animation. In my case I cannot add the target frame because it's not a NSObject (it's actually a CGRectangle).

Additionally, how can I acces to > forKey:NSViewAnimationTargetKey and or forKey:NSViewAnimationEndFrameKey from Xamarin.Mac?

Some help would be appreciated. Thanks.

Best Answer


Sign In or Register to comment.