Let’s consider this snippet of code:
https://gist.github.com/kmdarshan/80da197f9b2e143fb9c4
Using respondsToSelector:
https://gist.github.com/kmdarshan/fec1374b5c160abf51be
Obviously you can add additional checks, to see the kind of class, check the length and so on.
Leave a Reply