chrispellett / Xamarin-Forms-Shape

An example of how to draw more complex shapes in Xamarin that works in both Android and iOS. Examples include a Circle, a Rectangle (that has more power than the standard BoxView) and a "Circle Indicator" (which shows a percentage
MIT License
51 stars 28 forks source link

'ShapeRenderer.Draw(RectangleF)': no suitable method found to override #3

Open xavierpena opened 8 years ago

xavierpena commented 8 years ago

When I use the code in a new blank Xamarin Forms project (instead of directly using the code from github), I have the following error in DrawShape.iOS:

'ShapeRenderer.Draw(RectangleF)': no suitable method found to override

Regarding other compilation errors, I had to change:

using CoreGraphics;
using UIKit;

instead of:

using MonoTouch.UIKit;
using MonoTouch.CoreGraphics;

... so maybe the new UIView from Xamarin Forms is somehow different than the one from MonoTouch.UIKit?

xavierpena commented 8 years ago

I have created a test project in order to isolate the issues and solve them:

https://github.com/xavierpena/XamarinShapesTest

deduefren commented 8 years ago

Seems, like an iOS API change, i was able to make it work with no more change that this two signatures:

public override void Draw(CGRect rect) { ... } protected RectangleF AdjustForThickness(CGRect rect)

Drakkins commented 7 years ago

@chrispellett Please take a look at the pull request of @cassionandi (pull request) it solve it and think about accepting it.