函数 objc_getAssociatedObject 的隐式声明在 C99 中无效 [英] Implicit declaration of function objc_getAssociatedObject is invalid in C99

查看:46
本文介绍了函数 objc_getAssociatedObject 的隐式声明在 C99 中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 Objective-c 类别中使用关联对象,但收到此警告.

I'm trying to use Associated Objects on my objective-c category and I'm getting this warning.

Implicit declaration of function 'objc_getAssociatedObject' is invalid in C99

如果这有所不同,我也会使用 arc.

Also I'm using arc if that makes a difference.

推荐答案

你添加了吗

#import <objc/runtime.h>

在文件的开头?

这篇关于函数 objc_getAssociatedObject 的隐式声明在 C99 中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆