[Mono-osx] Animating Views Example

Miguel de Icaza miguel at novell.com
Tue Nov 9 11:23:03 EST 2010


> 1) Missing NSIntegralRect object.  Is there a replacement for this or is it
> something that is missing?

I added some extensions methods now to MonoMac, so you should be able to
invoke those methods on the RectangleF:

	var newRect = rect.IntegralRect ();

> 2) When trying to use NSValue.FromRectangleF it was giving me the following:
> 
> +[NSValue valueWithCGRect:]: unrecognized selector sent to class 0xa0506e18
> 
> This makes sense as it is part of UIKit and not AppKit as far as I know. 
> What would be the equivalent going forward?

Good catch, I have now added the AppKit specific version, the API stays
the same, but you should not be getting the error anymore. 

> 3) The NSView Animator Proxy ( example: [[subview animator] setFrame:[self
> integralRect:frame]]; ) is not available so used the CABasicAnimation in
> another method to animate the subviews.  Is this correct for now?

I have added these missing pieces now, could you try this again with the
new APIs (Animator is the name of the property).

> 4) I searched high and low in the source code of MonoMac Core and MonoMac
> but could not find a way to implement the CABasicAnimation with a PointF for
> "position" instead of breaking them up into two different animations.  I
> guess this goes along with question #2.

Do you have a sample snippet of Objective-C that you could share with
me?   That would help me figure out where this is supposed to go.

Miguel



More information about the Mono-osx mailing list