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

什麼是方法CGrectGetWidth和CGrectGetMinX的單點觸控版本?CgRectGetWidth monodouch

回答

5

更新Xamarin.iOS統一的API

Xamarin.iOS介紹它現在包含CGRect和朋友裏面CoreGraphics命名空間中的Unified API


CGRect被映射到System.Drawing.RectangleFSee Type Mappings

所以,如果你有自己的System.Drawing.RectangleF

的代碼看起來像

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

希望幫助

亞歷克斯