5

is this really to use cocoacontrols with xamarin? For example this one: http://www.cocoacontrols.com/platforms/ios/controls/kycirclemenu I know that I can create something like circle menu with UICollectionView (http://docs.xamarin.com/guides/ios/user_interface/introduction_to_collection_views) But anyway wondering is this really use cocoapods.

Thanks, Yaro

Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
Yaroslav Bigus
  • 678
  • 7
  • 24

2 Answers2

5

Given that you write the binding for the API (http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c_libraries), yes, you can probably use that control in your xamarin.ios app.

Before starting a new binding, check if it's already available here or elsewhere on github

Stephane Delcroix
  • 16,134
  • 5
  • 57
  • 85
5

You can bind Objective C based Cocoapods to xamarin and its officially supported (https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/walkthrough/)

  1. you have to find the github repo of the cocoapod and convert that into a static library(.a) file
  2. you have to use that static library to create binding library in Xam studio

then you are good to use in xamarin.ios

But swift based library is not officially supported in Xamarin.So you can't use Swift based cocoapods directly in xamarin as you do But there are workarounds

  1. You can bridge the Swift framework to C# using Objective C i.e expose the Swift APIs using Objective C and convert that into .a static library and then binding library

  2. Try porting the Swift to C# and it should be faster as well

As Stephane Delcroix quoted

Look if there are any existing monotouch bindings available here before starting to port

Graham
  • 7,431
  • 18
  • 59
  • 84
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241