-1

I am trying to convert an open source flyout menu from Objective-C to Xamarin. The current issue I have is that the Obj-C code creates a frame using CGRectInfinite. This does not appear to be available under MonoTouch, via the usual RectangleF class. Is there an alternative?

Similarly, there does not appear to be a CGRectIsInfinite equivalent in RectangleF. What, if any, is the alternative?

1 Answer 1

1

Add this using statement first:

using MonoTouch.CoreGraphics;

Then you can test it with this:

public static RectangleF GetInfinite()
{
    var image = CIImage.EmptyImage;

    if (image.Extent.IsInfinite ())
    {
        return image.Extent;
    }

    throw new Exception ("Unable to create infinite rect");
}
1
  • It's the IsInfinite () method. 'image.Extent' is a RectangleF.
    – SKall
    Mar 5, 2014 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.