I am trying to use the answer accepted here: Dynamic UIMenuItems with @selector and dynamic methods But it gives a warning (and this does not work): implicit declaration of function 'class_addMethod'
I searched google but have no idea.
Add #include <objc/runtime.h> to the top of the implementation file (.m or .c).
#include <objc/runtime.h>