I'm trying to develop an IOS application works with objC++. I am using this GUI framework for designing my GUI. But, the problem is that XCode does not seem to recognise its own library objc/runtime.h or objc_getassociatedobject methods. It is an Objective-C method and it is rather surprising that i get this error. XCode gives error No matching function to call objc_getassociatedobject
even though i #import <objc/runtime.h>
.
objc_getAssociatedObject()
's second parameter has type const void *
, whereas you are trying to pass a NSString *
. C++ is pretty strict about implicit type conversions and it is not happy about such a conversion.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.