-1

I have a custom renderer on SwipeView for Android using Xamarin forms. I want to replicate the same for iOS. But I am not sure where to start as I don't know what should be the keywords that are appropriate for iOS. For example, this below code snippet is on Android.

Android.Views.View _contentView; RemoveAllViews();

How do I know what exactly to use for iOS? Where can I learn to compare and replicate between the two platforms' Custom renderers using Xamarin.forms?

arvindhK
  • 31
  • 5

1 Answers1

1

There is no general, or simple, answer to this. What you can do:

In the Android custom renderer, find out what Android type this.Control is. One way to do this is to set a breakpoint in one of the methods, and examine this.Control in the debugger. Then you'll need to read Android docs for that type.

For iOS, do a google search like iOS control similar to Android XYZ, where XYZ is the Android type.

OR copy the renderer into your iOS project, comment out everything Android specific. Try to get to the point where you can breakpoint, and see what iOS control is used.

Then read iOS docs.


Its also possible to download Xamarin Forms source code from github. Find the built-in Renderers for Android and iOS for the XF control being used as a base. Compare them.

ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196