2012-05-11 3 views
3
floorf(CGRectGetMinX(visibleBounds)/CGRectGetWidth(visibleBounds)); 

Quelle est la version monotouch des méthodes CGrectGetWidth et CGrectGetMinX? introduit le Unified API qui contient maintenant CGRect et amis à l'intérieur CoreGraphics espace de nomsCgRectGetWidth monotouch

Répondre

5

Mise à jour Xamarin.iOS API unifiée

Xamarin.iOS.


CGRect est mappée à System.Drawing.RectangleF (See Type Mappings)

Donc, si vous avez votre propre System.Drawing.RectangleF

Le code ressemblerait

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

espoir qui aide

Alex