CgRectGetWidth monotouch

floorf(CGRectGetMinX(visibleBounds) / CGRectGetWidth(visibleBounds)); 

What is the version of monotouch methods CGrectGetWidthand CGrectGetMinX?

+3
source share
1 answer

Update Unified Xamarin.iOS API

Xamarin.iOS has introduced a unified API that now also contains CGRectfriends within the namespace CoreGraphics.


CGRectmapped to System.Drawing.RectangleF( See type mapping )

So, if you have your own System.Drawing.RectangleF

The code will look like

RectangleF visibleBounds = new RectangleF(0, 0, 10, 10); // Or your own instance of visibleBounds           
float minx = visibleBounds.GetMinX();
float w = visibleBounds.Width;

Hope that helps

Alex

+5
source

All Articles