3

There is a popular approach of overriding default behavior of methods in iOS called Method Swizzling. http://nshipster.com/method-swizzling/

My question: is there are any analogous for that approach in Xamarin.iOS?

Taier
  • 2,109
  • 12
  • 22
  • honestly, it depends entirely on what's being exposed by xamarin for any given natively derived method. I think you'll likely run into situations where it will allow you to override the default behaviour, but then fail to compile correctly due to Xamarin's build process for iOS projects. Maybe test this out on one of their sample projects and see if it'll compile when you start changing the default behaviours of things like their life cycle methods like viewdidload etc. – JoeTomks Jul 06 '17 at 12:59
  • This may help https://stackoverflow.com/questions/14127453/how-to-port-method-getimplementation-and-method-setimplementation-to-monotou – fractor Dec 02 '19 at 13:02

0 Answers0